Skip to content

Conversation

@scptre
Copy link

@scptre scptre commented Jun 20, 2022

JsonConverter.cs

Added new JsonConverter abstract class JsonConverter2 with override to WriteJson with the Contract and Property parameters to allow features like TypeNameHandling.Auto handling to be added to the converter

JsonSerializerInternalWriter.cs

Added a check to the JsonSerializerInternalWriter.SerializeConvertable function to check for the new JsonConverter2 base class and call the WriteJson override with the contract and property parameters.

JsonConverter2Tests.cs

Added a test case to test the serialization of a collection with multiple types and the TypeNameHandling.Auto logic added to a JsonConverter2 converter.

----------------
Added new JsonConverter abstract class JsonConverter2 with override to WriteJson with the Contract and Property parameters to allow features like TypeNameHandling.Auto handling to be added to the converter

JsonSerializerInternalWriter.cs
-------------------------------
Added a check to the JsonSerializerInternalWriter.SerializeConvertable function to check for the new JsonConverter2 base class and call the WriteJson override with the contract and property parameters.

JsonConverter2Tests.cs
----------------------
Added a test case to test the serialization of a collection with multiple types and the TypeNameHandling.Auto logic added to a JsonConverter2 converter.
@scptre scptre changed the title JsonConverter.cs Add Contract and Property Parameters to JsonConverter Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant