-
Notifications
You must be signed in to change notification settings - Fork 296
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
Board Review: ObjectSerializer C# #1578
Comments
C# API Approved by @KrzysztofCwalina post review-board review. |
@bterlson, @johanste, @JonathanGiles, We won't be having a separate meeting to review this API. Please note that this is being shipped in less than 2 weeks |
cc @annatisch, @srnagar, @xirzec |
What level of confidence is there that this API will be sufficient to also support JSON.net? |
We have an implementation. The level of confidence is high. |
I have no concerns about the C# design. |
I also have no concerns about the C# design. |
Extracted from #1454
The Basics
We'd like to add ObjectSerializer abstraction and Syste.Text.Json-based implementation for .NET.
Champion Scenarios
We’re introducing a Bring Your Own Serializer model because there a lot of customers who wont come to Track 2 without it.
ObjectSerializer
is the base abstraction. We’re shippingJsonObjectSerializer : ObjectSerializer
to wrap usingSystem.Text.Json
. As a customer you’ll still use all theSystem.Text.Json
attributes, naming policies, options, documentation, etc., for your typeT
. You’ll just tell our client libraries which serializer you’re using viaclientOptions.Serializer = new JsonObjectSerializer(new System.Text.Json.JsonSerializerOptions(...))
and we’ll use it for all your custom model types in our clients. You can see more example usage in the tests.Sample
Using clients with a custom model and default serializer
Using clients with a custom model with System.Text.Json attributes and default serializer
Using clients with a custom model with customized default serializer
Using clients with a custom model with Newtonsoft.Json serializer
The text was updated successfully, but these errors were encountered: