Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The original spec said UTF-8/16/32, but unaware of any reference implementation that used anything other than UTF-8 ... though, who knows with hand rolled crap, and windows in the mix.


https://tc39.es/ecma262/#sec-json.stringify

The stringify function returns a String in UTF-16 encoded JSON format representing an ECMAScript value, or undefined.


Python's `json` returns text, which you can encode however you want.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: