Hi, On Thu, Nov 26, 2015 at 5:24 PM, Nikita Popov <nikita....@gmail.com> wrote: > > > What are your thoughts on this? > > First of all, thanks a lot for looking into it! That's great!
I think that it's all cool except the fact that json_decode would result in fatal error. I don't think that json_decode should kill the script in this case. It's much better to return NULL and set a new JSON_ERROR_... We could maybe add some EG var to silence it when using json_decode and set it back when finished. In that case when the collision limit is exceeded it would set another EG that could be checked in the json_parser.y as UNEXPECTED after each addition to the object or array. It's not probably nicest solution and it would probably slow down slightly the json parser but it could work and it's still better than fatal error IMHO. What do you think? Cheers Jakub