[erlang-questions] JSON for STDLIB

Loïc Hoguin <>
Mon Sep 7 09:39:23 CEST 2015


On 09/07/2015 03:34 AM, Theepan wrote:
> Team,
>
> Is there any reason why a JSON library is not included into Erlang/OTP
> releases? Since it was initially planned for telco systems, it includes
> ASN.1 library. It has some other transfer-format libraries as well.

ASN.1 isn't just a "transfer-format", it's something OTP itself *uses*. 
Without the ASN.1 application, there would be no public_key application, 
and therefore no SSL, to name one.

JSON would be just sitting there. What's the point?

Another argument against it is one you cited in your email: there are 
already a variety of open source JSON libraries. Each has different 
properties and are useful to different people. Why would you include one 
and basically doom the others? Which one would you bundle? Will that 
choice make sense to everyone?

Finally, I'm not sure what's the point? If you are using Erlang.mk, to 
use jsx, you need to add this single line to your Makefile:

DEPS = jsx

If jsx was part of OTP, you would need to add this single line to your 
Makefile:

OTP_DEPS = jsx

The advantage of bundling it in OTP are not obvious, to say the least.

In general I believe OTP should reduce the number of libraries it comes 
with, not increase it. It's easy to find a library fitting your needs 
nowadays. Erlang.mk for example has 470 packages and you can search them 
in one easy command: make search q=json

Cheers,

-- 
Loïc Hoguin
http://ninenines.eu
Author of The Erlanger Playbook,
A book about software development using Erlang


More information about the erlang-questions mailing list