<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><span style="font-family:Arial,Helvetica,sans-serif">On Mon, Nov 2, 2020 at 10:39 PM Viktor Söderqvist <<a href="mailto:viktor@zuiderkwast.se">viktor@zuiderkwast.se</a>> wrote:</span><br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Is it time to re-evaluate adding json:{encode,decode}/1 in OTP? Or are<br>
the arguments against it still valid?<br>
<br></blockquote><div><br></div><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Different JSON encoders tend to have different guarantees and behavior. If you include one in the stdlib, you take on a certain maintenance burden on top of a selection of properties. Chances are people will still pull a library from the outside which suits their use case better for their problem space. One of the peculiar things about JSON is that it is slow to parse, and people tend to use it for large chunks of data. This combination is slowing down lots of software, unless the encoder/decoder is particularly fast. Also, it suggests people should compress their data streams, which isn't a solution: the data simply blows up in memory and still takes a good while to parse.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">In turn, it means you have to make a number of hard trade-offs in a JSON library, which are far from easy to make and maintain.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I'm not against blessing one library to become the de-facto standard, but one should definitely make sure to document the trade-offs made in the library, or you risk people mis-using it. I'm also not against putting a library in the stdlib. But if done, you would have to remove something else, and some of the already included format coders are quite abundant in telecom, I'm afraid.</div><br></div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature">J.</div></div>