Previous Page
dump()

Solar_Json_Checker
isValid()

Next Page
locale()

isValid()

public bool 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.