Example usage for com.fasterxml.jackson.databind JsonSerializer isUnwrappingSerializer

List of usage examples for com.fasterxml.jackson.databind JsonSerializer isUnwrappingSerializer

Introduction

In this page you can find the example usage for com.fasterxml.jackson.databind JsonSerializer isUnwrappingSerializer.

Prototype

public boolean isUnwrappingSerializer() 

Source Link

Usage

From source file:net.logstash.logback.marker.ObjectFieldsAppendingMarker.java

@Override
public void writeTo(JsonGenerator generator) throws IOException {
    if (object != null) {
        ObjectMapper mapper = (ObjectMapper) generator.getCodec();
        JsonSerializer<Object> serializer = getBeanSerializer(mapper);
        if (serializer.isUnwrappingSerializer()) {
            serializer.serialize(object, generator, getSerializerProvider(mapper));
        }//w  w w  .j ava 2 s  . com
    }
}