Open aijkl opened 1 year ago
@JamesNK I'm sorry, why is this not possible?
There have been no comments yet that it is impossible. I think implementing such features like this one brings a low of additional work manipulating with NRT annotations and simply is not in the focus of project. Honestly NSJ receives only bugfixes for a long time and I'm sure that "semi-official" position is to migrate to STJ.
@sungam3r thank you What are STJs? Do you mean System.Text.Json?
yep
Source/destination types
Source/destination JSON
Expected behavior
Even if JsonRequriedAttibute is not set, in #nullable enabled environment, I want to throw "Newtonsoft.Json.JsonSerializationException: Required property 'Name' not found" Is.
I don't think this can be the default setting as it is a disruptive change But you can enable it by setting it in JsonConvert.DefaultSettings
Actual behavior
In actual operation, even with #nullable enable, if JsonRequired is not set, a JonSerializationException will not be thrown So Model.Name will be null.
Steps to reproduce
Thanks for the great library.