-
Notifications
You must be signed in to change notification settings - Fork 475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add naming strategy option to JsonSerializer #525
Conversation
Looks like a good addition. Would you mind adding a unit tests to the EventTests project? |
@normj Good point. A unit test has been added. |
@normj What do you think about the idea of adding the |
I'm okay adding |
@normj You're right about my primary use case. Regarding For this reason, please ignore my suggestion of adding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good. I'll get it merged in when do the next release.
@normj Do you have any rough idea of when you will create the next release? I am waiting for this to use it. No rush, I just want to have an idea of when this will be available. |
Version 1.7.0 of Amazon.Lambda.Serialization.Json has been released with this PR. |
The blog post is great! Hope you don't mind I tweeted out your post. I didn't see you on twitter to tag you on the tweet. |
Description of changes:
I propose to add a Newtonsoft naming strategy to the
Amazon.Lambda.Serialization.Json.JsonSerializer
. This makes it possible to change the naming strategy to camel case for example.This is particularly usefull for people that follow the google guideline that says to format json documents in camel case and that also follow the C# guideline that says to name properties using pascal case.
Having a consistent naming strategy is particularly important when using step functions that are case sensitive.
Here's an example of the new behaviour:
This will write the following in the console:
Possible improvement:
I think that using a
CamelCaseJsonSerializer
is a pretty common need. Should it be added toAmazon.Lambda.Serialization.Json
?By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.