public class 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.
Modifier and Type | Field and Description |
---|---|
static JacksonSupport |
INSTANCE
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.
|
Modifier and Type | Method and Description |
---|---|
static com.fasterxml.jackson.databind.ObjectMapper |
createDefaultMapper(CordaRPCOps rpc,
com.fasterxml.jackson.core.JsonFactory factory,
boolean fuzzyIdentityMatch,
boolean fullParties)
Creates a Jackson ObjectMapper that uses RPC to deserialise parties from string names.
|
static com.fasterxml.jackson.databind.ObjectMapper |
createDefaultMapper(CordaRPCOps rpc,
com.fasterxml.jackson.core.JsonFactory factory,
boolean fuzzyIdentityMatch)
Creates a Jackson ObjectMapper that uses RPC to deserialise parties from string names.
|
static com.fasterxml.jackson.databind.ObjectMapper |
createDefaultMapper(CordaRPCOps rpc,
com.fasterxml.jackson.core.JsonFactory factory)
Creates a Jackson ObjectMapper that uses RPC to deserialise parties from string names.
|
static com.fasterxml.jackson.databind.ObjectMapper |
createDefaultMapper(CordaRPCOps rpc)
Creates a Jackson ObjectMapper that uses RPC to deserialise parties from string names.
|
static com.fasterxml.jackson.databind.ObjectMapper |
createInMemoryMapper(IdentityService identityService,
com.fasterxml.jackson.core.JsonFactory factory,
boolean fuzzyIdentityMatch,
boolean fullParties)
Creates a Jackson ObjectMapper that uses an
interface IdentityService directly inside the node to deserialise parties from string names. |
static com.fasterxml.jackson.databind.ObjectMapper |
createInMemoryMapper(IdentityService identityService,
com.fasterxml.jackson.core.JsonFactory factory,
boolean fuzzyIdentityMatch)
Creates a Jackson ObjectMapper that uses an
interface IdentityService directly inside the node to deserialise parties from string names. |
static com.fasterxml.jackson.databind.ObjectMapper |
createInMemoryMapper(IdentityService identityService,
com.fasterxml.jackson.core.JsonFactory factory)
Creates a Jackson ObjectMapper that uses an
interface IdentityService directly inside the node to deserialise parties from string names. |
static com.fasterxml.jackson.databind.ObjectMapper |
createInMemoryMapper(IdentityService identityService)
Creates a Jackson ObjectMapper that uses an
interface IdentityService directly inside the node to deserialise parties from string names. |
static com.fasterxml.jackson.databind.ObjectMapper |
createNonRpcMapper(com.fasterxml.jackson.core.JsonFactory factory,
boolean fullParties)
For testing or situations where deserialising parties is not required
|
static com.fasterxml.jackson.databind.ObjectMapper |
createNonRpcMapper(com.fasterxml.jackson.core.JsonFactory factory)
For testing or situations where deserialising parties is not required
|
static com.fasterxml.jackson.databind.ObjectMapper |
createNonRpcMapper()
For testing or situations where deserialising parties is not required
|
com.fasterxml.jackson.databind.Module |
getCordaModule()
Deprecated.
|
public static JacksonSupport INSTANCE
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.
public com.fasterxml.jackson.databind.Module getCordaModule()
public static com.fasterxml.jackson.databind.ObjectMapper createDefaultMapper(CordaRPCOps rpc, com.fasterxml.jackson.core.JsonFactory factory, boolean fuzzyIdentityMatch, boolean fullParties)
Creates a Jackson ObjectMapper that uses RPC to deserialise parties from string names.
fuzzyIdentityMatch
- If false, fields mapped to class Party
objects must be in X.500 name form and precisely
match an identity known from the network map. If true, the name is matched more leniently but if the match
is ambiguous a JsonParseException is thrown.fullParties
- If true then class Party
objects will be serialised as JSON objects, with the owning key serialised
in addition to the name. For class PartyAndCertificate
objects the cert path will be included.public static com.fasterxml.jackson.databind.ObjectMapper createDefaultMapper(CordaRPCOps rpc, com.fasterxml.jackson.core.JsonFactory factory, boolean fuzzyIdentityMatch)
Creates a Jackson ObjectMapper that uses RPC to deserialise parties from string names.
fuzzyIdentityMatch
- If false, fields mapped to class Party
objects must be in X.500 name form and precisely
match an identity known from the network map. If true, the name is matched more leniently but if the match
is ambiguous a JsonParseException is thrown.public static com.fasterxml.jackson.databind.ObjectMapper createDefaultMapper(CordaRPCOps rpc, com.fasterxml.jackson.core.JsonFactory factory)
Creates a Jackson ObjectMapper that uses RPC to deserialise parties from string names.
public static com.fasterxml.jackson.databind.ObjectMapper createDefaultMapper(CordaRPCOps rpc)
Creates a Jackson ObjectMapper that uses RPC to deserialise parties from string names.
public static com.fasterxml.jackson.databind.ObjectMapper createNonRpcMapper(com.fasterxml.jackson.core.JsonFactory factory, boolean fullParties)
For testing or situations where deserialising parties is not required
fullParties
- If true then class Party
objects will be serialised as JSON objects, with the owning key serialised
in addition to the name. For class PartyAndCertificate
objects the cert path will be included.public static com.fasterxml.jackson.databind.ObjectMapper createNonRpcMapper(com.fasterxml.jackson.core.JsonFactory factory)
For testing or situations where deserialising parties is not required
public static com.fasterxml.jackson.databind.ObjectMapper createNonRpcMapper()
For testing or situations where deserialising parties is not required
public static com.fasterxml.jackson.databind.ObjectMapper createInMemoryMapper(IdentityService identityService, com.fasterxml.jackson.core.JsonFactory factory, boolean fuzzyIdentityMatch, boolean fullParties)
Creates a Jackson ObjectMapper that uses an interface IdentityService
directly inside the node to deserialise parties from string names.
fuzzyIdentityMatch
- If false, fields mapped to class Party
objects must be in X.500 name form and precisely
match an identity known from the network map. If true, the name is matched more leniently but if the match
is ambiguous a JsonParseException is thrown.fullParties
- If true then class Party
objects will be serialised as JSON objects, with the owning key serialised
in addition to the name. For class PartyAndCertificate
objects the cert path will be included.interface IdentityService
public static com.fasterxml.jackson.databind.ObjectMapper createInMemoryMapper(IdentityService identityService, com.fasterxml.jackson.core.JsonFactory factory, boolean fuzzyIdentityMatch)
Creates a Jackson ObjectMapper that uses an interface IdentityService
directly inside the node to deserialise parties from string names.
fuzzyIdentityMatch
- If false, fields mapped to class Party
objects must be in X.500 name form and precisely
match an identity known from the network map. If true, the name is matched more leniently but if the match
is ambiguous a JsonParseException is thrown.interface IdentityService
public static com.fasterxml.jackson.databind.ObjectMapper createInMemoryMapper(IdentityService identityService, com.fasterxml.jackson.core.JsonFactory factory)
Creates a Jackson ObjectMapper that uses an interface IdentityService
directly inside the node to deserialise parties from string names.
interface IdentityService
public static com.fasterxml.jackson.databind.ObjectMapper createInMemoryMapper(IdentityService identityService)
Creates a Jackson ObjectMapper that uses an interface IdentityService
directly inside the node to deserialise parties from string names.
interface IdentityService