<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 8 mar 2014, at 14:47, Pierre Fenoll <<a href="mailto:pierrefenoll@gmail.com">pierrefenoll@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Let's not forget though that most languages implementation of JSON uses hash tables.<div>Before 17.0, the JSON mapping used lists; taking lookup linear time.<br><div>Maps have a lookup time of O(log n).<br>
That's still not O(1)…</div></div></div><div class="gmail_extra"><br clear="all"></div></blockquote>The current map implementation suggest that you should not use it for big maps yet.</div><div>Say less than 10 elements or so. Guess what? that could be thought of as O(1) :-)</div><div><br></div><div>/Tony</div><div><br><blockquote type="cite"><div class="gmail_extra"><div><div dir="ltr"><div><div><br></div><div>Cheers,</div><div>-- </div><div>Pierre Fenoll</div></div><div><br></div></div></div>
<br><br><div class="gmail_quote">On 8 March 2014 14:42, Carsten Bormann <span dir="ltr"><<a href="mailto:cabo@tzi.org" target="_blank">cabo@tzi.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It is true that different applications may need different mappings of the JSON data model into the data model of the specific application, but the following is not a valid reason:<br>
<div class=""><br>
On 08 Mar 2014, at 13:14, Jesper Louis Andersen <<a href="mailto:jesper.louis.andersen@gmail.com">jesper.louis.andersen@gmail.com</a>> wrote:<br>
<br>
> 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.<br>
<br>
</div>The “standard” has been stable since RFC 4627, which was published in July 2006.<br>
Since, ECMA TC39 (the committee for changing JavaScript) has decided to allow top-level numbers, primitives (false, true, null), and strings; the IETF has reluctantly followed this change and published RFC 7159 with that change.<br>
<br>
Apart from the question whether one should accept top-level numbers/primitives/strings (and it is easy for an application to follow the Postel principle here: be liberal in what you accept and conservative in what you send), there has been no “fluctuation” in JSON.<br>
<br>
With the acceptance of UTF-8 strings (“binaries”) into the Erlang world, there is a straightforward mapping of JSON data into the Erlang model.<br>
Mapping back may require a bit more application knowledge (e.g., how do you encode non-JSON concepts such as atoms?), but a basic mapping can easily be part of the standard library, certainly easier than for ASN.1 or XML.<br>
<br>
Grüße, Carsten<br>
<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</div></div></blockquote></div><br></div>
_______________________________________________<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>http://erlang.org/mailman/listinfo/erlang-questions<br></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; "><div><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 12px; ">"Installing applications can lead to corruption over time. </span><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 12px; ">Applications gradually write over each other's libraries, partial upgrades occur, user and system errors happen, and minute changes may be unnoticeable and difficult to fix"</span></div><div><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 12px; "><br></span></div></span><br class="Apple-interchange-newline">
</div>
<br></body></html>