[erlang-questions] No JSON/MAPS interoperability in 17.0?

Jesper Louis Andersen jesper.louis.andersen@REDACTED
Sat Mar 8 14:14:36 CET 2014


On Sat, Mar 8, 2014 at 2:01 PM, Charles Irvine <chuck.irvine@REDACTED>wrote:

> I recently read that the “JSON Bridge” that Joe Armstrong describes in his
> new book won’t be included in Erlang 17.0. This would have been very
> useful. With Json becoming so prevalent (web services, browsers, Mongodb,
> etc), I think it is really surpassing XML as a common data interoperability
> format. It must have been on the table at one point or it wouldn’t have
> appeared in Joe’s book. Why did it not make it into the release? I think
> someone indicated that it really didn’t belong in the maps module and I can
> kind of see that. But why not just put it in a “json” module? Regards, Chuck


We already have a fair number of JSON handlers for Erlang:

jsx, jiffy, mochijson, mochijson2, yaws json (deprecated), yaws json2, ...

The reason we have that many is quite simple. One JSON parser does not
satisfy all requirements. And to make things worse, there are small
fluctuations in the "standard" which make it hard to create proper support.
Adding a `json` module to the standard library is asking for jumping into
this minefield. I'd much rather see libraries adopt maps as a way to
represent JSON structures in Erlang. With maps, there is a neat mapping
between most JSON documents and Erlang terms which will be useful. But I
would be wary of standardizing on one due to the different requirements in
handling.




-- 
J.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140308/2f01ac0a/attachment.htm>


More information about the erlang-questions mailing list