Package com.c8db

Class VelocyJack

    • Constructor Detail

      • VelocyJack

        public VelocyJack()
    • Method Detail

      • serialize

        public com.arangodb.velocypack.VPackSlice serialize​(Object entity)
                                                     throws C8DBException
        Description copied from interface: C8Serializer
        Serialize a given Object to VelocyPack
        Specified by:
        serialize in interface C8Serializer
        Parameters:
        entity - The Object to serialize. If it is from type String, it will be handled as a JSON.
        Returns:
        The serialized VelocyPack
        Throws:
        C8DBException
      • serialize

        public com.arangodb.velocypack.VPackSlice serialize​(Object entity,
                                                            C8Serializer.Options options)
                                                     throws C8DBException
        Description copied from interface: C8Serializer
        Serialize a given Object to VelocyPack
        Specified by:
        serialize in interface C8Serializer
        Parameters:
        entity - The Object to serialize. If it is from type String, it will be handled as a JSON.
        options - Additional options
        Returns:
        the serialized VelocyPack
        Throws:
        C8DBException
      • deserialize

        public <T> T deserialize​(com.arangodb.velocypack.VPackSlice vpack,
                                 Type type)
                          throws C8DBException
        Description copied from interface: C8Deserializer
        Deserialize a given VelocyPack to an instance of a given type
        Specified by:
        deserialize in interface C8Deserializer
        Parameters:
        vpack - The VelocyPack to deserialize
        type - The target type to deserialize to. Use String for raw JSON.
        Returns:
        The deserialized VelocyPack
        Throws:
        C8DBException