Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support JSON5 #538

Open
trustin opened this issue Sep 28, 2020 · 6 comments · May be fixed by #655
Open

Support JSON5 #538

trustin opened this issue Sep 28, 2020 · 6 comments · May be fixed by #655

Comments

@trustin
Copy link
Member

trustin commented Sep 28, 2020

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

@minwoox
Copy link
Member

minwoox commented Nov 3, 2021

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

@ks-yim
Copy link

ks-yim commented Nov 22, 2021

Let me handle this issue 🤚.

@ks-yim ks-yim linked a pull request Dec 7, 2021 that will close this issue
@Dogacel
Copy link

Dogacel commented Mar 1, 2024

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.

@minwoox
Copy link
Member

minwoox commented Mar 4, 2024

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? 😉

@Dogacel
Copy link

Dogacel commented Mar 4, 2024

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?

@minwoox
Copy link
Member

minwoox commented Mar 6, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants