centraldogma
centraldogma copied to clipboard
Support JSON5
https://json5.org/
JSON5 is a superset of JSON which adds some nice-to-haves to JSON, such as comments, trailing commas in arrays, etc. Will be useful for those who write configuration in JSON.
Related: #151
It seems like if we enable some features of Jackson parser, we can use most of the features of JSON5. https://stackoverflow.com/questions/68312227/can-the-jackson-parser-be-used-to-parse-json5
Let me handle this issue 🤚.
It seems like the PR is still stale after 2 years. Is there any initiative to complete this issue?
I can try to take over the PR next week if needed.
Hi! We need to implement the v2 API before proceeding with JSON5 and YAML support. Otherwise, the server won't be able to determine if the client can handle JSON5 and YAML. https://github.com/line/centraldogma/pull/655#issuecomment-1510935762
Are you interested in implementing V2 API? 😉
Hi! We need to implement the v2 API before proceeding with JSON5 and YAML support. Otherwise, the server won't be able to determine if the client can handle JSON5 and YAML. #655 (comment)
Are you interested in implementing V2 API? 😉
Hmm maybe I am missing some context. What changes are planned in V2 API?
Also one thing I wonder is whether just supplying a custom ObjectMapper
would be enough to support JSON5? In the end, it is all about adding, converting or ignoring some characters from JSON, right?
Also one thing I wonder is whether just supplying a custom ObjectMapper would be enough to support JSON5?
The current client, which will become the old client once JSON5 support is added, cannot handle a JSON5 file. Because of that, the server cannot just send a JSON5 file to the client. The client will get a parsing exception. Therefore, if the client wants to use JSON5, the client must utilize a different API, which will be V2.
What changes are planned in V2 API?
The V1 API will read JSON5 file as JSON file and YAML file as a TEXT file. Meanwhile, the V2 API will read the files as they are.