You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would expect it to not require the DataMemberAttribute if IncludeFields is set. Exiting too early.
I did notice there were no tests for this specific thing in System.Text.Json Tests so I think it just fell through the cracks.
The text was updated successfully, but these errors were encountered:
brandonryan
changed the title
public Fields not showing up when using System.Text.Json
Bug: Public Fields not showing up when using System.Text.Json
Mar 7, 2024
Public fields aren't being generated in the output schema when SerializerOptions.IncludeFields = true.
Reproduction:
https://dotnetfiddle.net/amyqcs
Assuming it has something to do with SystemTextJsonReflectionService?
I think I narrowed it down to this line:
I would expect it to not require the DataMemberAttribute if
IncludeFields
is set. Exiting too early.I did notice there were no tests for this specific thing in System.Text.Json Tests so I think it just fell through the cracks.
The text was updated successfully, but these errors were encountered: