Is a JSON object having an empty string as a key valid, for example { "c": "x", "": "y" }
?
It certainly seems to be, or at least it doesn't seem to break the web if I using it in a browser as per this jsfiddle having the following code:
var a = { "a": "x", "b": "y" };
var b = { "c": "x", "": "y" };
var c = JSON.stringify(a);
var d = JSON.stringify(b);
console.log(c);
console.log(d);
var e = JSON.parse(c);
var f = JSON.parse(d);
console.log(e);
console.log(f);
There is a good reason why I need (want) to use an empty string for a key, but am I just asking for trouble, in terms of browser compatibility and future-proofing?