DETECT_KEY_CONFLICTS
DETECT_KEY_CONFLICTS = 1
Parser class
Example:
$parser = new JsonParser(); // returns null if it's valid json, or an error object $parser->lint($json); // returns parsed json, like json_decode does, but slower, throws exceptions on failure. $parser->parse($json);
Ported from https://github.com/zaach/jsonlint
lint(string $input, integer $flags) : null|\Seld\JsonLint\ParsingException
string | $input | JSON string |
integer | $flags | Bitmask of parse/lint options (see constants of this class) |
null if no error is found, a ParsingException containing all details otherwise