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 |
---|---|
NonExistentClass |
createDefaultMapper(JacksonSupport.PartyInfoRpcOps info,
NonExistentClass factory,
boolean fuzzyIdentityMatch,
boolean fullParties)
Creates a Jackson ObjectMapper that uses RPC to deserialise parties from string names.
|
NonExistentClass |
createDefaultMapper(NonExistentClass rpc,
NonExistentClass factory,
boolean fuzzyIdentityMatch,
boolean fullParties)
Creates a Jackson ObjectMapper that uses RPC to deserialise parties from string names.
|
NonExistentClass |
createInMemoryMapper(NonExistentClass identityService,
NonExistentClass factory,
boolean fuzzyIdentityMatch,
boolean fullParties)
Creates a Jackson ObjectMapper that uses an IdentityService directly inside the node to deserialise parties from string names.
|
NonExistentClass |
createNonRpcMapper(NonExistentClass factory,
boolean fullParties)
For testing or situations where deserialising parties is not required
|
NonExistentClass |
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 NonExistentClass getCordaModule()
public NonExistentClass createDefaultMapper(JacksonSupport.PartyInfoRpcOps info, NonExistentClass factory, boolean fuzzyIdentityMatch, boolean fullParties)
Creates a Jackson ObjectMapper that uses RPC to deserialise parties from string names.
fuzzyIdentityMatch
- If false, fields mapped to 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 Party objects will be serialised as JSON objects, with the owning key serialised
in addition to the name. For PartyAndCertificate objects the cert path will be included.public NonExistentClass createDefaultMapper(NonExistentClass rpc, NonExistentClass factory, boolean fuzzyIdentityMatch, boolean fullParties)
Creates a Jackson ObjectMapper that uses RPC to deserialise parties from string names.
fuzzyIdentityMatch
- If false, fields mapped to 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 Party objects will be serialised as JSON objects, with the owning key serialised
in addition to the name. For PartyAndCertificate objects the cert path will be included.public NonExistentClass createNonRpcMapper(NonExistentClass factory, boolean fullParties)
For testing or situations where deserialising parties is not required
fullParties
- If true then Party objects will be serialised as JSON objects, with the owning key serialised
in addition to the name. For PartyAndCertificate objects the cert path will be included.public NonExistentClass createInMemoryMapper(NonExistentClass identityService, NonExistentClass factory, boolean fuzzyIdentityMatch, boolean fullParties)
Creates a Jackson ObjectMapper that uses an IdentityService directly inside the node to deserialise parties from string names.
fuzzyIdentityMatch
- If false, fields mapped to 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 Party objects will be serialised as JSON objects, with the owning key serialised
in addition to the name. For PartyAndCertificate objects the cert path will be included.