timheuer / alexa-skills-dotnet

An Amazon Alexa Skills SDK for .NET
MIT License
547 stars 108 forks source link

Update README with additional setup info #226

Closed bcuff closed 3 years ago

bcuff commented 3 years ago

The default serialization was different from what was required when I initially set up my project. This confused me so I thought I'd add this to the setup docs.

timheuer commented 3 years ago

Thanks for the PR!!! This is interesting to me as I've not had to do that before... @stoiveyp have you been doing this as well?

timheuer commented 3 years ago

@all-contributors please add @bcuff for documentation

allcontributors[bot] commented 3 years ago

@timheuer

I've put up a pull request to add @bcuff! :tada:

bcuff commented 3 years ago

If you use the Visual Studio template for AWS Lambda functions it uses this serializer by default now

[assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.SystemTextJson.DefaultLambdaJsonSerializer))]
stoiveyp commented 3 years ago

@timheuer Yeah the default JSON serializer from the AWS team is now System.Text.Json rather than Newtonsoft so you either have to change the serializer or use JsonConvert on the incoming stream/string.

Bit annoying as swapping the serializer is becoming common practice for .NET Lambdas using third party libraries as Newtonsoft is still by far the most commonly supported.