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

Make JsonConfiguration itself @Serializable #832

Open
hfhbd opened this issue May 6, 2020 · 4 comments
Open

Make JsonConfiguration itself @Serializable #832

hfhbd opened this issue May 6, 2020 · 4 comments
Assignees

Comments

@hfhbd
Copy link
Contributor

hfhbd commented May 6, 2020

What is your use-case and why do you need this feature?
I would like to store the JsonConfiguration itself in a Json file and read them at startup. This allows to use different behavior with a simple change in the config files.

eg having a prod configuration and a debug configuration, which use a less strict Json De-/Encoder or uses pretty print.

Of course, the JsonConfiguration for reading the json configs must be static defined and cannot be defined in the config file.

Describe the solution you'd like
Add @serializable to JsonConfiguration

Current workaorund:
Implement a custom serializer, which I did for my project

@hfhbd hfhbd added the feature label May 6, 2020
@sandwwraith sandwwraith added the up for grabs A good issue for external contribution label May 12, 2020
@qwwdfsad qwwdfsad removed the up for grabs A good issue for external contribution label Jul 2, 2020
@sandwwraith
Copy link
Member

Closing for the reason described in #877 (review)

@qwwdfsad qwwdfsad closed this as completed Jul 2, 2020
@hfhbd
Copy link
Contributor Author

hfhbd commented Jul 7, 2020

Its fine, my implementation was only adding 1 attribute :) But I would like to have the option changing the json behaviour with a config file, even with the new API.

@sandwwraith
Copy link
Member

#877 (comment)

@sandwwraith
Copy link
Member

Note that current JsonConfiguration is useless for creating new Json instances (as it was intended to be used mainly in encoders/decoders), so one still would need to use JsonBuilder for that.

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

No branches or pull requests

3 participants