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

clone System.Text.Json.Serialization.JsonSerializerOptions throws exception. #8

Open
StevenTCramer opened this issue Jun 23, 2019 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@StevenTCramer
Copy link

StevenTCramer commented Jun 23, 2019

trying to clone JsonSerializerOptions in dotnet core 3 throws exception.

JsonNamingPolicy.CamelCase is not an enum but some crazy object.

using System.Text.Json.Serialization;

    public void ShouldCloneJsonSerializationOptions()
    {
      var jsonSerializerOptions = new JsonSerializerOptions
      {
        PropertyNamingPolicy = JsonNamingPolicy.CamelCase
      };

      JsonSerializerOptions clone = jsonSerializerOptions.Clone();
      clone.PropertyNamingPolicy.ShouldBe(JsonNamingPolicy.CamelCase);
    }
@replaysMike replaysMike self-assigned this Aug 1, 2019
@replaysMike replaysMike added the bug Something isn't working label Aug 1, 2019
@replaysMike
Copy link
Owner

This is being looked at today, I'll follow up when the fix is merged

@StevenTCramer
Copy link
Author

@replaysMike Any update on this and TimeWarpEngineering/timewarp-state#148

I'm pushing out another update to Blazor-State today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants