Table of Contents

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
object
JvmSerializer
Derived

Fields

Jackson

Jackson, from the typedrest-serializers-jackson artifact.

public const string Jackson = "jackson"

Field Value

string

Kotlinx

kotlinx.serialization, the default of TypedRest for the JVM. Kotlin only.

public const string Kotlinx = "kotlinx"

Field Value

string

Moshi

Moshi, from the typedrest-serializers-moshi artifact.

public const string Moshi = "moshi"

Field Value

string

Properties

Artifact

The Maven coordinates of the artifact providing RuntimeSerializer, for the generated README.

public abstract string Artifact { get; }

Property Value

string

Name

The name of this serializer.

public abstract string Name { get; }

Property Value

string

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

JvmIdentifier

SupportsJava

Indicates whether this serializer can handle DTOs written in Java.

public abstract bool SupportsJava { get; }

Property Value

bool

Methods

EnumAnnotations()

Annotations that go on a generated enum.

public virtual IEnumerable<JvmAnnotation> EnumAnnotations()

Returns

IEnumerable<JvmAnnotation>

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

wireName string

Returns

JvmAnnotation

For(string)

Returns the serializer with name.

public static JvmSerializer For(string name)

Parameters

name string

Returns

JvmSerializer

Exceptions

ArgumentException

name is 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

wireName string

Returns

JvmAnnotation

TypeAnnotations()

Annotations that go on a generated DTO class itself.

public virtual IEnumerable<JvmAnnotation> TypeAnnotations()

Returns

IEnumerable<JvmAnnotation>