Replies: 1 comment
-
What are your thoughts about this @kehoecj ? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm wondering how your code should react to different flavored json versions
I already talked about NDJSON/JSONL in another discussion #133
But there is also jsonc format or json5 and a few others as described here in supersets section
https://en.m.wikipedia.org/wiki/JSON
Here are the spec
https://spec.json5.org/
https://github.com/json-c/json-c
There are many implementation in Go:
https://github.com/titanous/json5
https://github.com/tidwall/jsonc
https://github.com/adhocore/jsonc
https://github.com/komkom/jsonc/
I found these with a simple search.
These format may be used with my their own extensions, respectively .jsonc, .json5, and .jsonl (or .ndjson). it would be "easy" to support them.
My point is now to discuss how your code should react when facing valid jsonc/json5/jsonl document in a file with .json extension.
I mean should you add a warning when the bad extension is found for a .json file when it's a .jsonc. Should you mark it as invalid?
Your code is made to be used with a GitHub action I think, as a safeguard.
No one would read a linter suggestion in a GitHub action. It only fails or passes
Should you have a setting to support them or refuse them?
What are your thoughts guys?
Beta Was this translation helpful? Give feedback.
All reactions