Solar_Json_Checker::isValid()

public bool Solar_Json_Checker::isValid ( string $str )

The isValid method takes a UTF-16 encoded string and determines if it is a syntactically correct JSON text.

Parameters

  • (string) $str: The JSON text to validate

Returns

  • (bool)

Description

The isValid method takes a UTF-16 encoded string and determines if it is a syntactically correct JSON text.

It is implemented as a Pushdown Automaton; that means it is a finite state machine with a stack.



Local