Java Code Examples for org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeSerializer#writeTypeSuffixForArray()

The following examples show how to use org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeSerializer#writeTypeSuffixForArray() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JavaUtilSerializersV3d0.java    From tinkerpop with Apache License 2.0 5 votes vote down vote up
@Override
public void serializeWithType(final Set set, final JsonGenerator jsonGenerator,
                              final SerializerProvider serializerProvider, final TypeSerializer typeSerializer) throws IOException {
    typeSerializer.writeTypePrefixForArray(set, jsonGenerator);
    serialize(set, jsonGenerator, serializerProvider);
    typeSerializer.writeTypeSuffixForArray(set, jsonGenerator);
}
 
Example 2
Source File: JavaUtilSerializersV3d0.java    From tinkerpop with Apache License 2.0 5 votes vote down vote up
@Override
public void serializeWithType(final List list, final JsonGenerator jsonGenerator,
                              final SerializerProvider serializerProvider, final TypeSerializer typeSerializer) throws IOException {
    typeSerializer.writeTypePrefixForArray(list, jsonGenerator);
    serialize(list, jsonGenerator, serializerProvider);
    typeSerializer.writeTypeSuffixForArray(list, jsonGenerator);
}
 
Example 3
Source File: GraphSONUtil.java    From tinkerpop with Apache License 2.0 4 votes vote down vote up
public static void writeEndArray(final Object o, final JsonGenerator jsonGenerator, final TypeSerializer typeSerializer) throws IOException {
    if (typeSerializer != null)
        typeSerializer.writeTypeSuffixForArray(o, jsonGenerator);
    else
        jsonGenerator.writeEndArray();
}