corda / net.corda.client.jackson / JacksonSupport

JacksonSupport

object JacksonSupport

Utilities and serialisers for working with JSON representations of basic types. This adds Jackson support for the java.time API, some core types, and Kotlin data classes.

Note that Jackson can also be used to serialise/deserialise other formats such as Yaml and XML.

Types

AmountDeserializer

object AmountDeserializer : JsonDeserializer<Amount<*>>

AmountSerializer

object AmountSerializer : JsonSerializer<Amount<*>>

AnonymousPartyDeserializer

object AnonymousPartyDeserializer : JsonDeserializer<AnonymousParty>

AnonymousPartySerializer

object AnonymousPartySerializer : JsonSerializer<AnonymousParty>

CordaX500NameDeserializer

object CordaX500NameDeserializer : JsonDeserializer<CordaX500Name>

CordaX500NameSerializer

object CordaX500NameSerializer : JsonSerializer<CordaX500Name>

IdentityObjectMapper

class IdentityObjectMapper : PartyObjectMapper, ObjectMapper

NoPartyObjectMapper

class NoPartyObjectMapper : PartyObjectMapper, ObjectMapper

NodeInfoDeserializer

object NodeInfoDeserializer : JsonDeserializer<NodeInfo>

NodeInfoSerializer

object NodeInfoSerializer : JsonSerializer<NodeInfo>

OpaqueBytesDeserializer

object OpaqueBytesDeserializer : JsonDeserializer<OpaqueBytes>

OpaqueBytesSerializer

object OpaqueBytesSerializer : JsonSerializer<OpaqueBytes>

PartyDeserializer

object PartyDeserializer : JsonDeserializer<Party>

PartyObjectMapper

interface PartyObjectMapper

PartySerializer

object PartySerializer : JsonSerializer<Party>

PublicKeyDeserializer

object PublicKeyDeserializer : JsonDeserializer<PublicKey>

PublicKeySerializer

object PublicKeySerializer : JsonSerializer<PublicKey>

RpcObjectMapper

class RpcObjectMapper : PartyObjectMapper, ObjectMapper

SecureHashDeserializer

class SecureHashDeserializer<T : SecureHash> : JsonDeserializer<T>

SecureHashSerializer

object SecureHashSerializer : JsonSerializer<SecureHash>

SignedTransactionMixin

abstract class SignedTransactionMixin

ToStringSerializer

object ToStringSerializer : JsonSerializer<Any>

WireTransactionMixin

abstract class WireTransactionMixin

Properties

cordaModule

val cordaModule: Module

Functions

createDefaultMapper

fun createDefaultMapper(rpc: CordaRPCOps, factory: JsonFactory = JsonFactory(), fuzzyIdentityMatch: Boolean = false, fullParties: Boolean = false): ObjectMapper

Creates a Jackson ObjectMapper that uses RPC to deserialise parties from string names.

createInMemoryMapper

fun createInMemoryMapper(identityService: IdentityService, factory: JsonFactory = JsonFactory(), fuzzyIdentityMatch: Boolean = false): ObjectMapper

Creates a Jackson ObjectMapper that uses an IdentityService directly inside the node to deserialise parties from string names.

createNonRpcMapper

fun createNonRpcMapper(factory: JsonFactory = JsonFactory(), fullParties: Boolean = false): ObjectMapper

For testing or situations where deserialising parties is not required

Extension Functions

contextLogger

fun Any.contextLogger(): Logger

When called from a companion object, returns the logger for the enclosing class.