-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Implement JsonSerializerOptions.RespectRequiredConstructorParameters
#103096
Implement JsonSerializerOptions.RespectRequiredConstructorParameters
#103096
Conversation
Note regarding the
|
1 similar comment
Note regarding the
|
Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis |
@@ -296,7 +296,7 @@ public static void ThrowJsonException_JsonRequiredPropertyMissing(JsonTypeInfo p | |||
Debug.Assert(parent.PropertyCache != null); | |||
|
|||
// Soft cut-off length - once message becomes longer than that we won't be adding more elements | |||
const int CutOffLength = 50; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because I've updated the error message so that property names are wrapped with single quotes, I'm also increasing the cutoff so that roughly speaking the same number of properties are being displayed.
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonParameterInfo.cs
Show resolved
Hide resolved
...braries/System.Text.Json/tests/Common/ConstructorTests/ConstructorTests.ParameterMatching.cs
Outdated
Show resolved
Hide resolved
…onstructorTests.ParameterMatching.cs
src/libraries/System.Text.Json/src/System/Text/Json/AppContextSwitchHelper.cs
Show resolved
Hide resolved
...braries/System.Text.Json/tests/Common/ConstructorTests/ConstructorTests.ParameterMatching.cs
Show resolved
Hide resolved
…onstructorTests.ParameterMatching.cs
src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/OptionsTests.cs
Outdated
Show resolved
Hide resolved
…rialization/OptionsTests.cs
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonPropertyInfo.cs
Show resolved
Hide resolved
...braries/System.Text.Json/tests/Common/ConstructorTests/ConstructorTests.ParameterMatching.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM assuming comments are addressed
Fix #100075