aws / amazon-s3-encryption-client-dotnet

An encryption client that allows you to secure your sensitive data before you send it to Amazon S3.
https://aws.github.io/amazon-s3-encryption-client-dotnet/
Apache License 2.0
14 stars 10 forks source link

Make SDK V4 preview version trimmable #69

Closed normj closed 2 weeks ago

normj commented 3 weeks ago

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.