Description
Serializing a struct with the System.Text.Json serializer should serialize all public fields by default, and only exclude fields by default for classes.
Other information
I haven't tested out record types in C# 9, but would expect the behaviour there to be the same as serializing a struct.