We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
record R([JsonProperty(Required = Required.Always)] string A, [JsonProperty(Required = Required.Always)] string[] B);
{}
Deserialization error because the required properties were not present.
Deserializes successfully with all properties null.
JsonConvert.DeserializeObject<R>("{}");
The text was updated successfully, but these errors were encountered:
Your attribute is invalid, try to use [property:JsonProperty...]
Sorry, something went wrong.
@MO2k4
No, the application of the attribute as shown is not invalid. It's meant to support constructor parameters:
Newtonsoft.Json/Src/Newtonsoft.Json/JsonPropertyAttribute.cs
Lines 34 to 35 in 2eaa475
No branches or pull requests
Source/destination types
Source/destination JSON
Expected behavior
Deserialization error because the required properties were not present.
Actual behavior
Deserializes successfully with all properties null.
Steps to reproduce
The text was updated successfully, but these errors were encountered: