org.apache.tinkerpop.gremlin.structure.io.graphson

## Class GraphSONMapper

- java.lang.Object
- - org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONMapper

- All Implemented Interfaces:
    Mapper<ObjectMapper>

      public class GraphSONMapper
      extends Object
      implements Mapper<ObjectMapper>

  An extension to the standard Jackson `ObjectMapper` which automatically registers the standard `GraphSONModule` for serializing `Graph` elements. This class can be used for generalized JSON serialization tasks that require meeting GraphSON standards.

  `Graph` implementations providing an `IoRegistry` should register their `SimpleModule` implementations to it as follows:

       public class MyGraphIoRegistry extends AbstractIoRegistry {
         public MyGraphIoRegistry() {
           register(GraphSONIo.class, null, new MyGraphSimpleModule());
         }
       }

  Author:
    Stephen Mallette (http://stephen.genoprime.com)

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `GraphSONMapper.Builder`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static GraphSONMapper.Builder` | `build()`
    `static GraphSONMapper.Builder` | `build(GraphSONMapper mapper)` Create a new Builder from a given `GraphSONMapper`.
    `ObjectMapper` | `createMapper()` Create a new instance of the internal object mapper that an implementation represents.
    `TypeInfo` | `getTypeInfo()`
    `GraphSONVersion` | `getVersion()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### createMapper

          public ObjectMapper createMapper()

      Description copied from interface: `Mapper`
      Create a new instance of the internal object mapper that an implementation represents.
      Specified by:
        `createMapper` in interface `Mapper<ObjectMapper>`

    - #### getVersion

          public GraphSONVersion getVersion()

    - #### build

          public static GraphSONMapper.Builder build()

    - #### build

          public static GraphSONMapper.Builder build(GraphSONMapper mapper)

      Create a new Builder from a given `GraphSONMapper`.
      Returns:
        a new builder, with properties taken from the original mapper already applied.

    - #### getTypeInfo

          public TypeInfo getTypeInfo()

Copyright © 2013–2019 Apache Software Foundation. All rights reserved.