First class treatment would be if the language had JSON-typed objects with functionality, e.g. something like
const myJson = j'{"key":"value"}'; const value = myJson['key']; const newJson = myJson.set("otherkey", "newValue");
But AFAIK it doesn't, not even in ES6.
Implementing j`{"key":"value"}`; as a tagged template literal is left as an exercise for the reader.
First class treatment would be if the language had JSON-typed objects with functionality, e.g. something like
(using the j'' notation for a hypothetical json-typed value)But AFAIK it doesn't, not even in ES6.