JsonIgnore in record declaration
If we could use JsonIgnoreAttribute like this it could be very useful.

Thanks
I think this issue is already tracked, (can't find the exact issue though)
For the time being, you could use the following workaround to add an attribute to a property in a record
public record CustomerUser(Guid UserId, [property:JsonIgnore] Guid CustomerId, Guid RoleId);
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
Tagging subscribers to this area: @dotnet/area-system-text-json See info in area-owners.md if you want to be subscribed.
Issue Details
If we could use JsonIgnoreAttribute like this it could be very useful.

Thanks
| Author: | Julien-Marpault |
|---|---|
| Assignees: | - |
| Labels: |
|
| Milestone: | - |
The exact same issue: #49212, and similar: #60690 I'm going to close this issue as the solution is straight. However, I think it's worth some hint by the IDE.