Class GraphSONTypeSerializerV2


  • public class GraphSONTypeSerializerV2
    extends AbstractGraphSONTypeSerializer
    GraphSON 2.0 TypeSerializer.
    Author:
    Kevin Gallardo (https://kgdo.me), Stephen Mallette (http://stephen.genoprime.com)
    • Method Detail

      • writeTypePrefix

        public org.apache.tinkerpop.shaded.jackson.core.type.WritableTypeId writeTypePrefix​(org.apache.tinkerpop.shaded.jackson.core.JsonGenerator jsonGenerator,
                                                                                            org.apache.tinkerpop.shaded.jackson.core.type.WritableTypeId writableTypeId)
                                                                                     throws IOException
        Specified by:
        writeTypePrefix in class org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeSerializer
        Throws:
        IOException
      • writeTypeSuffix

        public org.apache.tinkerpop.shaded.jackson.core.type.WritableTypeId writeTypeSuffix​(org.apache.tinkerpop.shaded.jackson.core.JsonGenerator jsonGenerator,
                                                                                            org.apache.tinkerpop.shaded.jackson.core.type.WritableTypeId writableTypeId)
                                                                                     throws IOException
        Specified by:
        writeTypeSuffix in class org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeSerializer
        Throws:
        IOException
      • getClassFromObject

        protected Class getClassFromObject​(Object o)
        Description copied from class: AbstractGraphSONTypeSerializer
        We force only **one** translation of a Java object to a domain specific object. i.e. users register typeIDs and serializers/deserializers for the predefined types we have in the spec. Graph, Vertex, Edge, VertexProperty, etc... And **not** their implementations (TinkerGraph, DetachedVertex, TinkerEdge, etc..)
        Specified by:
        getClassFromObject in class AbstractGraphSONTypeSerializer