Skip to content
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

Merged
merged 4 commits into from
Jun 6, 2024

Conversation

eiriktsarpalis
Copy link
Member

Fix #100075

Copy link

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

1 similar comment
Copy link

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@eiriktsarpalis eiriktsarpalis self-assigned this Jun 5, 2024
@eiriktsarpalis eiriktsarpalis added this to the 9.0.0 milestone Jun 5, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis
See info in area-owners.md if you want to be subscribed.

@@ -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;
Copy link
Member Author

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.

Copy link
Member

@krwq krwq left a 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

@eiriktsarpalis eiriktsarpalis merged commit d06120f into dotnet:main Jun 6, 2024
79 of 83 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a STJ feature flag treating non-optional constructor parameters as required
3 participants