ResourcesFormat

class ResourcesFormat(val serializersModule: SerializersModule = EmptySerializersModule()) : SerialFormat

A format to (de)serialize resources instances

Constructors

Link copied to clipboard
fun ResourcesFormat(serializersModule: SerializersModule = EmptySerializersModule())

Types

Link copied to clipboard
data class Parameter(val name: String, val isOptional: Boolean)

A query parameter description

Functions

Link copied to clipboard
fun <T> decodeFromParameters(deserializer: KSerializer<T>, parameters: Parameters): T

Builds a T resource instance from parameters

Link copied to clipboard
fun <T> encodeToParameters(serializer: KSerializer<T>, value: T): Parameters

Builds Parameters for a resource T

Link copied to clipboard
fun <T> encodeToPathPattern(serializer: KSerializer<T>): String

Builds a path pattern for a given serializer

Link copied to clipboard
fun <T> encodeToQueryParameters(serializer: KSerializer<T>): Set<ResourcesFormat.Parameter>

Builds a description of query parameters for a given serializer

Properties

Link copied to clipboard
open override val serializersModule: SerializersModule