Closed adrianholovaty closed 5 months ago
Probably would need a way to read in a string for parsing the current specs but write out a list.
Done in 4a2dca56.
What about using HJSON to maintain, say, mnx-schema.hjson
, and from which mnx-schema.json
can be created automatically? The biggest advantages of HJSON are the possibility to have comments – and the possibility to have multi-line strings.
@lemzwerg We've already got a system that generates the mnx-schema.json file automatically, and it's much richer than HJSON because it also generates the entirety of the HTML docs and stores a whole bunch of extra metadata. See more info here if you're interested: https://github.com/w3c/mnx/tree/main/docgenerator
OK, thanks for the info.
Currently the diffs to the
data.json
file are hard to read, especially for long strings that contain newlines. One way to improve this would be to change the serialization to always store strings as arrays, where each element of the array is a line — effectively just splitting the string by newlines.Let's give that a shot to see whether it's an improvement (it would otherwise have zero effect on the docs system).