xamarin-branch-deep-linking-attribution icon indicating copy to clipboard operation
xamarin-branch-deep-linking-attribution copied to clipboard

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

Open rdavisau opened this issue 1 year ago • 0 comments
trafficstars

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.

rdavisau avatar May 04 '24 02:05 rdavisau