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

Migrate use of Newtonsoft.Json to System.Text.Json #162

Open
rdavisau opened this issue May 4, 2024 · 0 comments
Open

Migrate use of Newtonsoft.Json to System.Text.Json #162

rdavisau opened this issue May 4, 2024 · 0 comments

Comments

@rdavisau
Copy link

rdavisau commented May 4, 2024

Describe the feature

Remove the Newtonsoft.Json dependency by migrating usages to System.Text.Json.

At a quick glance, changes would be to BranchContentMetadata.cs, BranchEvent.cs, BranchLinkProperties.cs, BranchUniversalObject.cs, BranchiOSUtils.cs.

Usages of JsonConvert.DeserializeObject<Dictionary<string,object>> would become JsonSerializer.Deserialize<Dictionary<string, JsonElement>> and subsequent code for plucking out properties would be updated appropriately.

Usages of JsonConvert.SerializeObject would be replaced with JsonSerializer.Serialize. Need to verify that default serialization settings match or configure STJ options to match (so that ToJsonString methods still return the same output), or it could be a breaking change.

If maintainers are open to the change I could take a crack at this.

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

1 participant