Reputation: 680
MissingMemberHandling attributes instructs Json.Net to issue an error if json text contains property that is missing from C# class. I want the inverse behaviour as well. I want that Json.Net issues an error if there is a C# property that is missing from json text.
Upvotes: 1
Views: 224
Reputation: 680
I little bit of source digging accomplished with documentation search showed
[JsonObject(ItemRequired = Required.Always)]
Applying the above on class marks all of it fields required for de-serialization. As well, JsonObject
attribute is inherited, what in my case is very helpful.
Upvotes: 1