-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Add JSON src-gen support for deserializing with parameterized ctors #56354
Conversation
Tagging subscribers to this area: @eiriktsarpalis, @layomia |
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to 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. |
@@ -28,10 +33,9 @@ internal abstract class JsonParameterInfo | |||
|
|||
public JsonNumberHandling? NumberHandling { get; private set; } | |||
|
|||
// The zero-based position of the parameter in the formal parameter list. | |||
public int Position { get; private set; } | |||
// Using a field to avoid copy semantics. |
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.
More reasons why it should be a class
.
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.
I presume this concern is no longer applicable. Should it be changed into a property?
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.
Thanks, will update in new PR to avoid CI reset.
...em.Text.Json/src/System/Text/Json/Serialization/Converters/Value/NullableConverterFactory.cs
Show resolved
Hide resolved
35cc8a2
to
e02ace7
Compare
a7ecaf8
to
5b901b4
Compare
5b901b4
to
c78013a
Compare
New APIs in this PR are in alignment with what was agreed on in API review - #45448 (comment). Some aspects of API review still need more consideration, but not the stuff in this PR. |
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.
Have not yet reviewed the entire PR, but approving to unblock @layomia for today. Will circle back for more feedback on Monday.
Also fixes #56182. FYI @avdv, @jasond-s