-
Notifications
You must be signed in to change notification settings - Fork 105
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
Bug in serialization of dependencies in JSchema #187
Comments
Thanks for the good repos. I've fix your issue. |
Thank you :) @JamesNK When will this be released? I would like implement this in my project soon :) |
@eivindjk : Thanks for reporting the issue. I ran into this too and I just downloaded the source, made a buld i VS and referenced the dll untill I can get the new version in a Nuget release. |
A preview package is now on NuGet: https://www.nuget.org/packages/Newtonsoft.Json.Schema/3.0.12-beta1 This contains the dependency fix. |
There might be a bug with serialization of the Dependency property of the JSchema object in Newtonsoft.Json.Schema.
When serialising a JSchema object with dependencis included, the serializer does not include the JSchemas addet to the dependency property. It is possible that i have done something wrong and has to use som serializer settings, but i suspect this might be a bug.
Below are two code examples with corresponding results. In both cases the objects can be indentified with the corerect values in the debugger in visual studio 2019.
Code example 1
Actual destination json
Expected destination json
I expected the result to be like this:
Code example 2
In this code I deserialized a JSchema and verifide that the values of the dependecy object was present by using the debugger. I expected the same output as input when deserializing and the serializing. This was not the case
Actual destination json
Expected destination json
I expected the result to be like this:
Steps to reproduce
I coded both examples as a .net core console application
The text was updated successfully, but these errors were encountered: