public function checkSyntax($json)
    {
        $parser = new JsonParser;

        if (($result = $parser->lint($json)) instanceof ParsingException) {
            throw $result;
        }
    }
public function checkSyntax($json)
    {
        $parser = new JsonParser;

        if (($result = $parser->lint($json)) instanceof ParsingException) {
            throw $result;
        }
    }
public function checkSyntax ( $ json ) { $ parser = new JsonParser ; if ( ( $ result = $ parser -> lint ( $ json ) ) instanceof ParsingException ) { throw $ result ; } }
Checks the syntax of the JSON string.

@param string $json The JSON string.

@throws JsonException  If the JSON string is invalid.
@throws ParseException If the JSON string is invalid.

@throws ParsingException If the JSON string contains lint.

@api
Checks the syntax of the JSON string .