Make SDK V4 preview version trimmable #69
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Make the V4 SDK preview version trimmable as well as add the metadata for sourcelink.
In order to make the library trimmable I replaced the usage of LitJson with System.Text.Json. This JSON used in the library is always a simple single object JSON of string to string pairs. I created a couple utility methods for converting back and forth from JSON to Dictionary<string, string>.
Testing
Ran the unit and integ tests and all still pass. I manually verified the JSON being produced is the same between LitJson and System.Text.Json and the only difference I saw when writing JSON with System.Text.Json it does more escaping for example escaping the
+
. I verified LitJson handled the escaping during reading. So if a user writes an object to S3 with this version and old version of the package using LitJson would still be able to read it.