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

Inject comments #6

Open
flaviojs opened this issue Jul 6, 2019 · 1 comment
Open

Inject comments #6

flaviojs opened this issue Jul 6, 2019 · 1 comment

Comments

@flaviojs
Copy link

flaviojs commented Jul 6, 2019

I'd like the ability to inject comments into a json string.
This is the right crate to put it, based on the name.

Details:

I have configuration files that have comments.
The files are meant to be edited manually (text editor) or in a launcher program.

I already mentioned that it's invalid json but the reply I got is that they chose RapidJSON exactly because it allowed that.
The launcher is C++ (GUI) mixed with rust code.

Right now all the comments that guide a user disappear when the launcher writes to the config file.
This is an obvious usability problem, so I want to make the launcher write default comments with the config.

As a minimal example, I want to turn this:

{
  "ms_per_game_cycle": 25
}

into this:

{
  // Number of milliseconds for one game cycle. Default: 25
  "ms_per_game_cycle": 25
}
@tmccombs
Copy link
Owner

tmccombs commented Jan 4, 2021

I'd be good with adding that functionality, although I'm not entirely sure what that would looke like? Do you have any ideas on the design of the feature, or even a rough idea of what you would like the API to look like?

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

No branches or pull requests

2 participants