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

Consolidate config_value and json_value #1448

Open
Neverlord opened this issue Jun 19, 2023 · 0 comments
Open

Consolidate config_value and json_value #1448

Neverlord opened this issue Jun 19, 2023 · 0 comments
Labels

Comments

@Neverlord
Copy link
Member

Currently, we have two separate ways of storing configuration values. For loading CLI and configuration file options, we have config_file. We also have an API for dealing with JSON. The latter uses a custom allocation strategy with a monotonic buffer resource. This allocator isn't thread-safe, which is why parsing a JSON document produces immutable values. Once produced, however, a json_value is cheap to copy around.

The actual implementation of the internal JSON values could be generalized and re-used. Either for new config formats (e.g., YAML or INI) or for using the same "backend" in config_value. However, this would most certainly introduce breaking API changes. So just filing as an idea for now.

@Neverlord Neverlord added the idea label Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant