The JSON.parse source text access TC39 proposal became a part of JavaScript a few months ago, and its features should also be supported here.
The proposal adds JSON.rawJSON(text), which provides a special object which JSON.stringify() serialises as the raw JSON text it contains (by accessing its rawJSON property).
These values should be identified by this library and serialised accordingly. We might also want to add something like YAML.rawYAML(text), if we can identify a use case for the serialization of a value that isn't valid JSON, but would be valid YAML.
The JSON.parse source text access TC39 proposal became a part of JavaScript a few months ago, and its features should also be supported here.
The proposal adds
JSON.rawJSON(text), which provides a special object whichJSON.stringify()serialises as the raw JSON text it contains (by accessing itsrawJSONproperty).These values should be identified by this library and serialised accordingly. We might also want to add something like
YAML.rawYAML(text), if we can identify a use case for the serialization of a value that isn't valid JSON, but would be valid YAML.