You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For now we have Jansson.mod utilized for json.mod.
Would it make sense to also support json5? The main benefit (for me) of json5 is the comment support and the multiline strings. They increase "readability" a lot.
When just using it as "readable datastorage" then json will be enough but some advanced "config files" mit benefit from commands.
I guess vscode internally uses json5 too as the launch.json files there allow comments ... so maybe a good example of "how it can be good".
Dunno if these implementations have issues with utf8 or so but they look rather "lightweight". Maybe UTF8-Handling can be done "afterwards" (similar to reading files with filestream.mod now).
Thoughts?
The text was updated successfully, but these errors were encountered:
For now we have Jansson.mod utilized for json.mod.
Would it make sense to also support json5? The main benefit (for me) of json5 is the comment support and the multiline strings. They increase "readability" a lot.
When just using it as "readable datastorage" then json will be enough but some advanced "config files" mit benefit from commands.
I guess vscode internally uses json5 too as the launch.json files there allow comments ... so maybe a good example of "how it can be good".
Json5:
https://json5.org
Sample json5 file:
https://github.com/chromium/chromium/blob/feb3c9f670515edf9a88f185301cbd7794ee3e52/third_party/blink/renderer/platform/runtime_enabled_features.json5
I am not aware of "the best c-library" for json5 (and the original implementation is TypeScript) so I just had a look what exists (amongst others):
https://github.com/detomon/json5
https://gist.github.com/inlife/b54a0d9228e428284e1d8eccbed97e35
-> but comments to that single-file-gist tell to use the newer one which can be extracted from the zpl-collection (which itself could have interesting things ...):
https://github.com/zpl-c/zpl/blob/master/code/source/parsers/json.c
Dunno if these implementations have issues with utf8 or so but they look rather "lightweight". Maybe UTF8-Handling can be done "afterwards" (similar to reading files with filestream.mod now).
Thoughts?
The text was updated successfully, but these errors were encountered: