net.corda.jackson

## Class JacksonSupport

- net.corda.jackson.JacksonSupport

-     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.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `JacksonSupport.AmountDeserializer`
    `static class` | `JacksonSupport.AmountSerializer`
    `static class` | `JacksonSupport.AnonymousPartyDeserializer`
    `static class` | `JacksonSupport.AnonymousPartySerializer`
    `static class` | `JacksonSupport.CalendarDeserializer`
    `static class` | `JacksonSupport.CompositeKeyDeserializer`
    `static class` | `JacksonSupport.CompositeKeySerializer`
    `static class` | `JacksonSupport.IdentityObjectMapper`
    `static class` | `JacksonSupport.NoPartyObjectMapper`
    `static class` | `JacksonSupport.NodeInfoDeserializer`
    `static class` | `JacksonSupport.NodeInfoSerializer`
    `static class` | `JacksonSupport.OpaqueBytesDeserializer`
    `static class` | `JacksonSupport.OpaqueBytesSerializer`
    `static class` | `JacksonSupport.PartyDeserializer`
    `static class` | `JacksonSupport.PartySerializer`
    `static class` | `JacksonSupport.PublicKeyDeserializer`
    `static class` | `JacksonSupport.PublicKeySerializer`
    `static class` | `JacksonSupport.RpcObjectMapper`
    `static class` | `JacksonSupport.SecureHashDeserializer<T extends SecureHash>` Implemented as a class so that we can instantiate for T.
    `static class` | `JacksonSupport.SecureHashSerializer`
    `static class` | `JacksonSupport.ToStringSerializer`

  - ### Field Summary

    Fields
    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.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static com.fasterxml.jackson.databind.ObjectMapper` | `createDefaultMapper(CordaRPCOps rpc, com.fasterxml.jackson.core.JsonFactory factory)` Mapper requiring RPC support to deserialise parties from names
    `static com.fasterxml.jackson.databind.ObjectMapper` | `createDefaultMapper(CordaRPCOps rpc)` Mapper requiring RPC support to deserialise parties from names
    `static com.fasterxml.jackson.databind.ObjectMapper` | `createInMemoryMapper(IdentityService identityService, com.fasterxml.jackson.core.JsonFactory factory)` For testing with an in memory identity service
    `static com.fasterxml.jackson.databind.ObjectMapper` | `createInMemoryMapper(IdentityService identityService)` For testing with an in memory identity service
    `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()`

- - ### Field Detail

    - #### INSTANCE

          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.

  - ### Method Detail

    - #### getCordaModule

          public com.fasterxml.jackson.databind.Module getCordaModule()

    - #### createDefaultMapper

          public static com.fasterxml.jackson.databind.ObjectMapper createDefaultMapper(CordaRPCOps rpc,
                                                                                        com.fasterxml.jackson.core.JsonFactory factory)

      Mapper requiring RPC support to deserialise parties from names

    - #### createDefaultMapper

          public static com.fasterxml.jackson.databind.ObjectMapper createDefaultMapper(CordaRPCOps rpc)

      Mapper requiring RPC support to deserialise parties from names

    - #### createNonRpcMapper

          public static com.fasterxml.jackson.databind.ObjectMapper createNonRpcMapper(com.fasterxml.jackson.core.JsonFactory factory)

      For testing or situations where deserialising parties is not required

    - #### createNonRpcMapper

          public static com.fasterxml.jackson.databind.ObjectMapper createNonRpcMapper()

      For testing or situations where deserialising parties is not required

    - #### createInMemoryMapper

          public static com.fasterxml.jackson.databind.ObjectMapper createInMemoryMapper(IdentityService identityService,
                                                                                         com.fasterxml.jackson.core.JsonFactory factory)

      For testing with an in memory identity service

    - #### createInMemoryMapper

          public static com.fasterxml.jackson.databind.ObjectMapper createInMemoryMapper(IdentityService identityService)

      For testing with an in memory identity service