Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
06-03-2014, 12:17 PM #1
- Join Date
- Jun 2010
- Thanked 8 Times in 8 Posts
PHP built-in for pinpointing JSON error?
Is there a built-in way of determining the character offset in a string at which json_decode falls over when it is passed malformed json?
json_last_error simply returns JSON_ERROR_SYNTAX, but it doesn't tell you *where* in the JSON string the syntax error was found. For long JSON strings, this is a pain in the butt.