Subject: [Json] JSON serialization - Two (incompatible) modes are in use

From: Anders Rundgren <[email-masked]>
Date: Sat, 12 Mar 2016 18:27:57 +0100

Having looked around a bit it seems that the JSON world is rather divided and needs to consider supporting two different serializations, one which is ES6-compatible and another which is ES6-compatible but properly escaped to be used in browser as a JavaScript object. The latter means that '<', '>', and '&' must be expressed as \unnnn. Preferably quotes around identifier-compatible property names are also dropped in the JavaScript mode.

Currently, different JSON authors haven't really made up their mind and that makes interoperability for "Crypto Safe" JSON unnecessary difficult although RegEx can be used to get things right.

JSON.stringify does NOT have to change because  on the wire and for normalization purposes only the "true" JSON notation is useful.

Anders