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

Use JSON Schema to define JSON format #51012

Closed
linonetwo opened this issue Aug 23, 2021 · 3 comments
Closed

Use JSON Schema to define JSON format #51012

linonetwo opened this issue Aug 23, 2021 · 3 comments
Labels
Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style <Enhancement / Feature> New features, or enhancements on existing [JSON] Changes (can be) made in JSON stale Closed for lack of activity, but still valid. <Suggestion / Discussion> Talk it out before implementing

Comments

@linonetwo
Copy link
Contributor

Is your feature request related to a problem? Please describe.

We don't have a portable (that can port to different language) description about what JSON format we accept, it is mostly embedded in the C++ code. And doc about JSON is sometimes incomplete.

And even use C++ to write 3rd party tool, we can't directly use a C++ SDK to speed up the JSON loading part development. Which is the most time-consuming part of tools about CDDA.

Describe the solution you'd like

Use JSON Schema to define the JSON that CDDA accepts, other 3rd party tools can generate code from JSON schema using https://transform.tools/json-schema-to-protobuf this kind of tools.

Describe alternatives you've considered

Or maintain SDK for different languages, but this can also be autogenerated if we have JSON Schema.

Additional context

I'm creating a map editor for CDDA, but adapting its JSON is a hard job, and later maintain it to keep update with experimental is human resource consuming.

@ZhilkinSerg
Copy link
Contributor

See #42986, #34735, #10965

@actual-nh actual-nh added <Enhancement / Feature> New features, or enhancements on existing <Suggestion / Discussion> Talk it out before implementing [JSON] Changes (can be) made in JSON Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style labels Aug 23, 2021
@stale
Copy link

stale bot commented Apr 28, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not 'bump' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

@stale stale bot added the stale Closed for lack of activity, but still valid. label Apr 28, 2022
@linonetwo
Copy link
Contributor Author

Okay, maybe generate JSONSchema from C++ code later, generate from an internal struct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style <Enhancement / Feature> New features, or enhancements on existing [JSON] Changes (can be) made in JSON stale Closed for lack of activity, but still valid. <Suggestion / Discussion> Talk it out before implementing
Projects
None yet
Development

No branches or pull requests

3 participants