Thu Nov 17 09:28:54 CET 2005
I've recieved approval to release the JSON library for Erlang!
I'll get it cleaned up and released tomorrow.
In message <EF4121B4EBC4E045BDE1273F9D0A87FF011209AA@REDACTED
se> Joe Armstrong writes:
>IMHO you might get a nicer mapping if you changed strings to binaries.
I've pondered that. It's a little awkward with the quoting and
unquoting you need to do. Binaries also imply that you'd need to
choose a Unicode format for the internal representation that would
be good for all applications.
>I'd let the parser return an association list (not a dict) - since (probably)
>the object is small
>and it's nice to be able to print it and pattern match it directly.
Yeah - I'd be glad to trade the asymptotic efficiency of dicts for
compactness and nicer printing. I liked dicts until they started
showing up in error reports. I'll probably change this in a future
Pattern matching? This means you'd have to:
* have the JSON decoder always sort the assoc-list;
* remember to maintain your pattern assoc-list in sorted order;
* have optional fields sort after mandatory fields.
Am I forgetting some new language feature?
Thanks for your thoughts!
More information about the erlang-questions