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

Anthony Ramine n.oxyde@REDACTED
Mon Mar 10 11:14:32 CET 2014


I didn’t assume anything about your own knowledge so feel free to do the same.

Even jsx, the most popular Erlang JSON lib, has options to handle these issues.

-- 
Anthony Ramine

Le 10 mars 2014 à 03:43, liuyanghejerry <liuyanghejerry@REDACTED> a écrit :

> 
>> The fact that you always have to think about where the JSON will be injected?
> 
> Yes I do, because I really hope Erlang std lib has it so I can use it without searching "what JSON package do you use with Erlang", without considering too much about compatibility, etc. Yes, I want my life easier with Erlang.
> 
>> What about a JSON-encoded string containing "</script>", should that be avoided by Erlang’s builtin parser? What about "]]>"? What about the two characters that are accepted in JSON but not in JavaScript?
> 
> JSON is not really that tight with JavaScript and HTML, you may want to learn more[1].
> 
>> 
>> Just because other languages include such a thing doesn’t mean Erlang should too. If diversity is not a reason to reject it, other languages providing it is not a reason to include it either.
>> 
> 
> Yes, it is my point that it's not a reason to reject it. Since you're questioning how parsers should behave, there're lots of "examples" in other languages.
> 
> [1]: http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf
> 




More information about the erlang-questions mailing list