[erlang-questions] SAX-like JSON Parser for Erlang

Richard O'Keefe <>
Tue Jan 22 06:51:42 CET 2013


On 19/01/2013, at 2:55 AM, Thomas Lindgren wrote:

> 
> 
> One potential problem with SAX-style parsing is that repeated keys in a JSON object will use/return only the last value (a behaviour inherited from javascript, I believe).

When implementing a JSON parser, I found the JSON specification
silent about this and asked for clarification.  Taking the last
value for repeated keys is *NOT* a defined property of JSON nor
is it something you can expect as a de-facto standard.  Some
parsers will take the first value.  Some will take the last one.
Some will raise a sensible exception.  Some a non-sensible one.





More information about the erlang-questions mailing list