[erlang-questions] SAX-like JSON Parser for Erlang
Michel Rijnders
g.a.c.rijnders@REDACTED
Tue Jan 22 13:59:32 CET 2013
Yep, I was recently looking into this because I'm writing a library that
will provide XPath like querying for JSON. The only thing RFC 4627 (JSON)
says is: ""The names within an object SHOULD be unique." But this is
"should" in the sense of RFC 2119, i.e. it means "recommended"...
On Tue, Jan 22, 2013 at 6:51 AM, Richard O'Keefe <ok@REDACTED> wrote:
>
> 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.
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
--
My other car is a cdr.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130122/ec2f8aa1/attachment.htm>
More information about the erlang-questions
mailing list