Re: New JSON parser

From: Date: Thu, 13 Mar 2014 22:37:54 +0000
Subject: Re: New JSON parser
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-73134@lists.php.net to get a copy of this message
Hi, On Thu, Mar 13, 2014 at 8:48 PM, Jakub Zelenka <bukka@php.net> wrote: > I need to do more testing before creating RFC for replacing the current > parser. There is still space for further improvements. If anyone has any > ideas, please let me know. Or if you could test it, that would be great > too! ;) At least for the decoding part, it might be worth to look at the "Improving JSON" proposal (http://bolinfest.com/essays/json.html). tl;dr: support trailing or automatic line-end commas, //-style comments and keys not wrapped in "s, basically extend JSON syntax to ES5. I think it would be really cool if the new parser could (maybe with a option "JSON_NO_STRICT_PARSING") implement these enhancements to ease hand-writing of JSON files. Also, will end-users be able to get the JSON parser error message? Currently, all you get is a NULL returned when you have a parse error somewhere in your JSON - and it's a nightmare to debug with this. Marco

« previous php.internals (#73134) next »