[erlang-questions] No JSON/MAPS interoperability in 17.0?
Loïc Hoguin
essen@REDACTED
Fri Mar 14 11:10:25 CET 2014
On 03/14/2014 08:41 AM, Carsten Bormann wrote:
> On 14 Mar 2014, at 02:08, Loïc Hoguin <essen@REDACTED> wrote:
>
>> On 03/13/2014 09:16 PM, Carsten Bormann wrote:
>>> On 10 Mar 2014, at 15:54, Loïc Hoguin <essen@REDACTED> wrote:
>>>
>>>> Could you elaborate on what the dominant usage of JSON is?
>>>
>>> Certainly.
>>>
>>> JSON is used for data interchange between applications or within components of an application.
>>
>> It's a terrible format for doing the above.
>>
>> * It's text-based, meaning it's incredibly slow to parse.
>
> The encoding/parsing overhead is in the noise for many JSON applications.
99% of applications just spend their resources doing irrelevant stuff,
JSON only being one of them. In Erlang JSON tends to be the one thing
that will eat your CPU, remove JSON and your nodes basically do nothing
CPU-wise, and still handle connection and logic for thousands of users
with little footprint.
So I guess I can also say: Use Erlang, save the planet!
> But yes, other applications exist (hint: RFC 7049).
I wouldn't classify it as interoperable as it seems to be missing a
number of implementations (Erlang being one). To be honest I'm not sure
how a format can be considered interoperable if it's not possible to
generate an encoder/decoder for any language from a machine-readable
spec. But maybe that's just me.
Interoperability and relying on the implementor to do the right thing
don't really go hand in hand.
> The main reason programmers use JSON is that it is a one-liner solution to a problem that could require a lot of effort otherwise.
Sure, but any serialization is a one-liner solution. I don't see your
point there.
> None of this takes away from my point that, in 2014, to interoperate you need to speak JSON.
To consume foreign data you need JSON sure, but you can use other
formats in your own service and still be interoperable. And perhaps if
enough people do it things will change for the better.
--
Loïc Hoguin
http://ninenines.eu
More information about the erlang-questions
mailing list