-
Notifications
You must be signed in to change notification settings - Fork 494
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
[Internal] SystemTextJsonSerializer: Adds STJ Serializer #4332
[Internal] SystemTextJsonSerializer: Adds STJ Serializer #4332
Conversation
Microsoft.Azure.Cosmos/src/Serializer/CosmosSystemTextJsonSerializer.cs
Outdated
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Poco/STJ/Cars.cs
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Poco/STJ/Cars.cs
Outdated
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/src/Serializer/CosmosDefaultSystemTextJsonSerializer.cs
Outdated
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/src/Serializer/CosmosDefaultSystemTextJsonSerializer.cs
Outdated
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/src/Serializer/CosmosDefaultSystemTextJsonSerializer.cs
Outdated
Show resolved
Hide resolved
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.
🕐
Microsoft.Azure.Cosmos/src/Serializer/CosmosDefaultSystemTextJsonSerializer.cs
Outdated
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/src/Serializer/CosmosSystemTextJsonSerializer.cs
Outdated
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/src/Serializer/CosmosSystemTextJsonSerializer.cs
Outdated
Show resolved
Hide resolved
Any update on this PR? It's been a few weeks and this is a much-anticipated change. |
Microsoft.Azure.Cosmos/src/Serializer/CosmosSystemTextJsonSerializer.cs
Outdated
Show resolved
Hide resolved
@Arcalise08 due to some reprioritizations this work was paused. We expect it to resume it after 2 weeks. |
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.
👍
Forgive me if I am being a bit slow, but since the change from public to internal in commit 1ff1f06, I can't see a way to use this in my own code. Have I missed something obvious? |
@kirankumarkolli @kundadebdatta Please follow up by adding a quick summary as to the final state of play here. |
@bartelink apologies, we change the usage model towards the end of the PR stage and missed to reflect that in the description. |
Thanks for bringing this up @bartelink ! I have updated the summary to explain how to use this serializer publicly by default. For your reference: There is a separate PR-4589 which explains the steps to use the I hope this will be helpful! Please feel free to reach out, if you have any questions. |
I guess the problem is that over the years there's been lots of PRs and/or snippets, and it's very easy to land on an issue like this which does not point to a final summary of how it worked out in the end. I know this PR has So the problem is that someoe scanning even the current overview might conclude that there is a
Maybe something like this, but written in proper English ;) ? To apply the
|
Updated the title to remove default and also the updated PR description to reference the PR which made the contracts public. |
Pull Request Template
Description
This PR adds a Default
System.Text.JSON
Implementation forCosmosLinqSerializer
. This default serializer can be used along with theCosmosClientOptions
to set the runtime serializer. Please take a look at the example below for usage:Note that this is just a default implementation which handles the basic scenarios. Any
JsonSerializerOptions
passed in here may not going to be reflected inSerializeMemberName()
.To handle special cases, please create a custom serializer which inherits from the
CosmosDefaultSystemTextJsonSerializer
and overrides theSerializeMemberName()
method to add any special handling.Below is an example of a custom serializer, which is inherits the
CosmosDefaultSystemTextJsonSerializer
to cover the special handling for camel case naming property.Type of change
Please delete options that are not relevant.
Closing issues
To automatically close an issue: closes #4330