Class SystemTextJsonAttributes
- Namespace
- TypedRest.CodeGeneration.CSharp
- Assembly
- TypedRest.CodeGeneration.CSharp.dll
Annotates DTOs for System.Text.Json.
public sealed class SystemTextJsonAttributes : JsonAttributes
- Inheritance
-
objectSystemTextJsonAttributes
- Inherited Members
Properties
Serializer
The name of the serializer these attributes are for.
public override string Serializer { get; }
Property Value
Methods
EnumMemberName(string)
Carries the wire name of an enum value whose C# name differs from it.
public override CSharpAttribute EnumMemberName(string name)
Parameters
namestring
Returns
Remarks
System.Text.Json ignores [EnumMember]. [JsonStringEnumMemberName] is the attribute its
JsonStringEnumConverter reads instead, and it requires .NET 9 or later.
PropertyName(string)
Carries the wire name of a property whose C# name differs from it.
public override CSharpAttribute PropertyName(string name)
Parameters
namestring