Nuget Package
JsonSchema.Net
Package Version
6.0.3
Operating System
Linux
.Net Target (if relevant, please specify the version in the description)
.Net (5 or after)
A clear and concise description of the bug.
If I don't register the keyword by passing in a JsonSerializerContext it will throw the following error when serializing the schema:
Unhandled exception. System.InvalidCastException: Unable to cast object of type 'UiPlaceholderKeyword' to type 'Json.Schema.UnrecognizedKeyword'
What did you expect?
The documentation does not mention needing a serializer context passed through, so I expected the schema to serialize without issue.
Please add test code or steps to reproduce the behavior.
Dotnet Fiddle: https://dotnetfiddle.net/hAgRn6
Is there any other information you'd like to share regarding this bug?
In #659 it was suggested this is due to running in an AOT context however:
- I'm not running in an AOT context(initially was setting up a POC in LINQPad)
- The documentation note added is missing information on arguments required for the overload
After moving my POC code from LINQPad to console project I was able to supply a JsonSerializerContext and confirm the schema would serialize without error.
P.S.: These Json projects are amazing and much appreciated.
Code of Conduct & Contributor Guidelines
Nuget Package
JsonSchema.Net
Package Version
6.0.3
Operating System
Linux
.Net Target (if relevant, please specify the version in the description)
.Net (5 or after)
A clear and concise description of the bug.
If I don't register the keyword by passing in a
JsonSerializerContextit will throw the following error when serializing the schema:What did you expect?
The documentation does not mention needing a serializer context passed through, so I expected the schema to serialize without issue.
Please add test code or steps to reproduce the behavior.
Dotnet Fiddle: https://dotnetfiddle.net/hAgRn6
Is there any other information you'd like to share regarding this bug?
In #659 it was suggested this is due to running in an AOT context however:
After moving my POC code from LINQPad to console project I was able to supply a
JsonSerializerContextand confirm the schema would serialize without error.P.S.: These Json projects are amazing and much appreciated.
Code of Conduct & Contributor Guidelines