[erlang-questions] No JSON/MAPS interoperability in 17.0?
Jesper Louis Andersen
Mon Mar 10 11:07:44 CET 2014
Some important points to consider:
* If you put a library into stdlib, it becomes a slow moving target. That
is, changes to this library will take months. Since maps are so new, it
would be better to iterate the library outside the standard release in any
case. Cutting down the OTP standard libraries is an important goal since it
unties the hands of the OTP team so they have to maintain less code.
* I think the parsing/unparsing is the least of the problems to handle. We
can, with proper options, work around oddities that doesn't follow the
standard correctly in both directions.
* The library API however, is going to be hard to tackle. Some will want a
C-NIF because lolspeed. Some will want stability and an implementation in
Erlang. Some will want SAX-style parsing and some just wants a term fully
decoded. Some will want an enumerator/iteratee pattern for chunked decoding
over a socket. Some will hate streaming. Some will like to inject
transforming functions into the JSON parser. Some will want the ability to
turn JSON objects into erlang records. And so on. Any implementation will
only support a subset of this.
The different implementations have differing guarantees. I think this is
good because we avoid one-library-to-rule-them-all and the bad design
symptoms it brings.
On Mon, Mar 10, 2014 at 3:43 AM, liuyanghejerry <>wrote:
> The fact that you always have to think about where the JSON will be
> Yes I do, because I really hope Erlang std lib has it so I can use it
> without searching "what JSON package do you use with Erlang", without
> considering too much about compatibility, etc. Yes, I want my life easier
> with Erlang.
> What about a JSON-encoded string containing "</script>", should that be
>> avoided by Erlang’s builtin parser? What about "]]>"? What about the two
> learn more.
>> Just because other languages include such a thing doesn’t mean Erlang
>> should too. If diversity is not a reason to reject it, other languages
>> providing it is not a reason to include it either.
> Yes, it is my point that it's not a reason to reject it. Since you're
> questioning how parsers should behave, there're lots of "examples" in other
> : http://www.ecma-international.org/publications/files/ECMA-
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions