There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
Add an attribute to JsonObject, RequiredByDefault
It is currently possible to mark a property as required, by using the [JsonProperty(Required = Required.Always)] notation.
It would, however, be really nice if it was also possible to mark on class-level that all properties are to be Required by default. (In essence, change the Required.Default setting - making it still possible to "opt out" certain properties that are not required if you like.)
This can be pretty convenient sometimes, when you have full control over both ends (both the sending and the receiving), and want to catch simple typos, uncoordinated changes in one end, etc. Could it be done?
My suggestion would be to add a RequiredByDefault property to JsonObject, which does this. If you find a better name, feel free to modify it as you like. Many thanks in advance, and thanks for a great library.