Example usage for com.fasterxml.jackson.databind.jsontype TypeSerializer writeTypePrefixForScalar

List of usage examples for com.fasterxml.jackson.databind.jsontype TypeSerializer writeTypePrefixForScalar

Introduction

In this page you can find the example usage for com.fasterxml.jackson.databind.jsontype TypeSerializer writeTypePrefixForScalar.

Prototype

public void writeTypePrefixForScalar(Object paramObject, JsonGenerator paramJsonGenerator,
            Class<?> paramClass) 

Source Link

Usage

From source file:com.wealdtech.jackson.modules.DateTimeRangeSerializer.java

@Override
public void serializeWithType(final Range<DateTime> value, JsonGenerator jgen, SerializerProvider provider,
        TypeSerializer typeSer) throws IOException, JsonProcessingException {
    typeSer.writeTypePrefixForScalar(value, jgen, Range.class);
    serialize(value, jgen, provider);/*w w w . j  a  va2  s.  c  o m*/
    typeSer.writeTypeSuffixForScalar(value, jgen);
}