Object JacksonSupport

  • All Implemented Interfaces:

    
    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.

    • Constructor Detail

    • Method Detail

      • createDefaultMapper

         final <Error class: unknown class> ,java.lang.Boolean,java.lang.Boolean)>createDefaultMapper(CordaRPCOps rpc, <Error class: unknown class> factory, Boolean fuzzyIdentityMatch, Boolean fullParties)

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

        Parameters:
        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.
        fullParties - If true then Party objects will be serialised as JSON objects, with the owning key serialised in addition to the name.
      • createNonRpcMapper

         final <Error class: unknown class> ,java.lang.Boolean)>createNonRpcMapper(<Error class: unknown class> factory, Boolean fullParties)

        For testing or situations where deserialising parties is not required

        Parameters:
        fullParties - If true then Party objects will be serialised as JSON objects, with the owning key serialised in addition to the name.
      • createInMemoryMapper

         final <Error class: unknown class> ,java.lang.Boolean,java.lang.Boolean)>createInMemoryMapper(IdentityService identityService, <Error class: unknown class> factory, Boolean fuzzyIdentityMatch, Boolean fullParties)

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

        Parameters:
        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.
        fullParties - If true then Party objects will be serialised as JSON objects, with the owning key serialised in addition to the name.