2 ms·
But if you're already changing the syntax, why do you worry about JSON interop at all? Just invent your own language. If you do worry about JSON interop, then
by xg15 9y ago
But if you're already changing the syntax, why do you worry about JSON interop at all? Just invent your own language.
If you do worry about JSON interop, then JSON-with-parsing-directives-disguised-as-comments would be valid JSON as well - just treat the directives as comments and ignore them.
The resulting tree would probably not reflect the data that the author ment to encode (because you ignored the directives) - but neither would the tree from the example above.