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

AddBlazoredLocalStorage() add public setter for options.JsonSerializerOptions #216

Closed
rf-0 opened this issue Aug 11, 2023 · 2 comments · Fixed by #217
Closed

AddBlazoredLocalStorage() add public setter for options.JsonSerializerOptions #216

rf-0 opened this issue Aug 11, 2023 · 2 comments · Fixed by #217
Labels
Feature New feature that will be added to the project

Comments

@rf-0
Copy link
Contributor

rf-0 commented Aug 11, 2023

Is your feature request related to a problem? Please describe.
Currently we need to set each JsonSerializerOptions manually independently if we have a static method already defined.

Describe the solution you'd like
Allow for options.JsonSerializerOptions to be set so a static JsonSerializerOptions config can be reused instead of setting each property again.

Blazored.LocalStorage.StorageOptions.LocalStorageOptions.JsonSerializerOptions

public JsonSerializerOptions JsonSerializerOptions { get; **set;** } = new JsonSerializerOptions();

Describe alternatives you've considered
Currently mapping everything manually (converters etc)

Additional context
Cleaner centralized code.

@rf-0 rf-0 added Feature Request Request to add a new feature Triage Issue needs to be triaged labels Aug 11, 2023
rf-0 added a commit to rf-0/BlazoredLocalStorage that referenced this issue Aug 11, 2023
@chrissainty chrissainty added Feature New feature that will be added to the project and removed Feature Request Request to add a new feature Triage Issue needs to be triaged labels Aug 14, 2023
@chrissainty
Copy link
Member

Hi @rf-0, this makes a lot of sense. I'm not sure why I removed the setter now in all honesty. Thank you for also raising a PR for this.

@chrissainty
Copy link
Member

I've merged your PR @rf-0 and just pushed a new release with the change. Thank you again for your help on this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature that will be added to the project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants