Class JvmSerializer
- Namespace
- TypedRest.CodeGeneration.Jvm
- Assembly
- TypedRest.CodeGeneration.Jvm.dll
Supplies the annotations that carry wire names on generated DTOs, for one specific JSON serializer.
public abstract class JvmSerializer
- Inheritance
-
objectJvmSerializer
- Derived
Fields
Jackson
Jackson, from the typedrest-serializers-jackson artifact.
public const string Jackson = "jackson"
Field Value
Kotlinx
kotlinx.serialization, the default of TypedRest for the JVM. Kotlin only.
public const string Kotlinx = "kotlinx"
Field Value
Moshi
Moshi, from the typedrest-serializers-moshi artifact.
public const string Moshi = "moshi"
Field Value
Properties
Artifact
The Maven coordinates of the artifact providing RuntimeSerializer, for the generated README.
public abstract string Artifact { get; }
Property Value
Name
The name of this serializer.
public abstract string Name { get; }
Property Value
RuntimeSerializer
The runtime Serializer the entry endpoint has to be constructed with, or null if it is
already the default of EntryEndpoint and can be left out.
public abstract JvmIdentifier? RuntimeSerializer { get; }
Property Value
SupportsJava
Indicates whether this serializer can handle DTOs written in Java.
public abstract bool SupportsJava { get; }
Property Value
Methods
EnumAnnotations()
Annotations that go on a generated enum.
public virtual IEnumerable<JvmAnnotation> EnumAnnotations()
Returns
EnumMemberName(string)
The annotation carrying the wire name of an enum value, or null if the name needs none.
public abstract JvmAnnotation? EnumMemberName(string wireName)
Parameters
wireNamestring
Returns
For(string)
Returns the serializer with name.
public static JvmSerializer For(string name)
Parameters
namestring
Returns
Exceptions
- ArgumentException
nameis not a known serializer.
PropertyName(string)
The annotation carrying the wire name of a property, or null if the name needs none.
public abstract JvmAnnotation? PropertyName(string wireName)
Parameters
wireNamestring
Returns
TypeAnnotations()
Annotations that go on a generated DTO class itself.
public virtual IEnumerable<JvmAnnotation> TypeAnnotations()