[NETCore31] Add support for using System.Text.Json as the serialization parser #568
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.
Issue #, if available:
#544
Description of changes:
.NET Core 3.0 added a new JSON serialization called System.Text.Json. This PR creates new Lambda serialization called Amazon.Lambda.Serialization.SystemTextJson that will be based on System.Text.Json. Unlike Newtonsoft's JSON parser System.Text.Json is built into the framework and is optimized for speed.
This will released as part of the upcoming Lambda .NET Core 3.1 and will only target .NET Core 3.1. There will not be a .NET Standard 2.0 which would make it available to .NET Core 2.1 Lambda functions because the event packages like Amazon.Lambda.S3 would have to take a dependency on the System.Text.Json Nuget package.
In my anecdotal testing I have seen some good cold start performance improvements using this library. For those that are currently trying .NET Core 3.1 on Lambda using the custom runtime feature here are preview versions of the impacted NuGet packages to try out.
https://normj-packages.s3.us-west-2.amazonaws.com/System.Text.Json-2020-01-17.zip
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.