Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Aug 24, 2021

Backport of #58054 to release/6.0-rc1

/cc @steveharter

Fixes #57836

Customer Impact

Broken scenario: with source-gen, specifying a custom JSON property name through the [JsonPropertyName(name)] attribute will cause a compile-time error if name is not a valid C# identifier, such as $value or Smtp-Id. No feasible workaround although a custom converter could be authored to do that.

Testing

A new test added to verify this scenario and the existing property name tests that run under the reflection-based serializer were modified to also under source-gen.

Risk

Low - changes are local to source-gen support of property names using [JsonPropertyName].

@ghost
Copy link

ghost commented Aug 24, 2021

Tagging subscribers to this area: @eiriktsarpalis, @layomia
See info in area-owners.md if you want to be subscribed.

Issue Details

Backport of #58054 to release/6.0-rc1

/cc @steveharter

Customer Impact

Testing

Risk

Author: github-actions[bot]
Assignees: -
Labels:

area-System.Text.Json

Milestone: -

@lewing lewing added the Servicing-approved Approved for servicing release label Aug 25, 2021
@lewing
Copy link
Member

lewing commented Aug 25, 2021

Approved in email

cc @danmoseley @ericstj

@mmitche mmitche merged commit 6145251 into release/6.0-rc1 Aug 25, 2021
@akoeplinger akoeplinger deleted the backport/pr-58054-to-release/6.0-rc1 branch August 28, 2021 22:03
@ghost ghost locked as resolved and limited conversation to collaborators Sep 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Text.Json Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants