api

http4k / org.http4k.format

Package org.http4k.format

Common code relevant to the various message format implementations (eg. JSON).

Types

Name Summary
Argo object Argo : Json<JsonNode>
AutoMappingConfiguration interface AutoMappingConfiguration<T>
This is the generic interface used to configure auto-mapping functionality for message format libraries. The various methods here can be used to provide custom mapping behaviour (say for domain classes).
AutoMarshallingJson abstract class AutoMarshallingJson
AutoMarshallingXml abstract class AutoMarshallingXml
ConfigurableGson open class ConfigurableGson : JsonLibAutoMarshallingJson<JsonElement>
ConfigurableJackson open class ConfigurableJackson : JsonLibAutoMarshallingJson<JsonNode>
ConfigurableJacksonXml open class ConfigurableJacksonXml : AutoMarshallingXml
ConfigurableMoshi open class ConfigurableMoshi : AutoMarshallingJson
Gson object Gson : ConfigurableGson
To implement custom JSON configuration, create your own object singleton. Extra mappings can be added before done() is called.
Jackson object Jackson : ConfigurableJackson
To implement custom JSON configuration, create your own object singleton. Extra mappings can be added before done() is called.
JacksonXml object JacksonXml : ConfigurableJacksonXml
To implement custom XML configuration, create your own object singleton. Extra mappings can be added before done() is called.
Json interface Json<NODE>
This is the contract for all JSON implementations
JsonErrorResponseRenderer class JsonErrorResponseRenderer<out NODE>
JsonLibAutoMarshallingJson abstract class JsonLibAutoMarshallingJson<NODE : Any> : AutoMarshallingJson, Json<NODE>
JsonType enum class JsonType
Moshi object Moshi : ConfigurableMoshi
To implement custom JSON configuration, create your own object singleton. Extra mappings can be added before done() is called.
Xml object Xml : AutoMarshallingXml

Exceptions

Name Summary
InvalidJsonException class InvalidJsonException : Exception

Extensions for External Classes

Name Summary
com.fasterxml.jackson.module.kotlin.KotlinModule  
com.google.gson.GsonBuilder  
com.squareup.moshi.Moshi.Builder  

Functions

Name Summary
withStandardMappings fun <T> AutoMappingConfiguration<T>.withStandardMappings(): AutoMappingConfiguration<T>
This is the set of (additional) standardised string <-> type mappings which http4k supports out of the box.