[erlang-questions] erlang parser for javascript literals
dmitry kolesnikov
dmkolesnikov@REDACTED
Mon Oct 8 12:41:41 CEST 2012
Hello Joe,
Object members without quotes is against JSON RFC. If you skip quotes
then this is not JSON any more.
I am using jsx parser, one of the best.
https://github.com/talentdeficit/jsx
Best Regards,
Dmitry >-|-|-*>
On 8.10.2012, at 13.07, Joe Armstrong <erlang@REDACTED> wrote:
> Does anybody have an Erlang parser for Javascript literals?
>
> I have some JSON terms - I have to write them like this:
>
> {"id" : 123,
> "author" : "erlang@REDACTED",
> "title" : "Some title",
> "type" : "html",
> "vsns":[{"vsn":1,
> "time":"201200908113012",
> "content":"<h1>This is html</h1>\n<pre>a\nb</pre>"}]
> }
>
> But I'd prefer to write them with far fewer quotes and with embedded
> line feeds like this:
>
> {id : 123,
> author : "erlang@REDACTED",
> title : "Some title",
> type : html,
> vsns:[{vsn:1,
> time:"201200908113012",
> content:"<h1>This is html</h1>
> <pre>a
> b
> </pre>"}]
> }
>
> Or do any of the erlang JSON parsers handle non quoted names in object literals?
>
>
> /Joe
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
More information about the erlang-questions
mailing list