Example usage for com.fasterxml.jackson.databind SerializerProvider getAnnotationIntrospector

List of usage examples for com.fasterxml.jackson.databind SerializerProvider getAnnotationIntrospector

Introduction

In this page you can find the example usage for com.fasterxml.jackson.databind SerializerProvider getAnnotationIntrospector.

Prototype

public final AnnotationIntrospector getAnnotationIntrospector() 

Source Link

Usage

From source file:org.hyperledger.jackson.TransactionSerializer.java

@Override
public JsonSerializer<?> createContextual(SerializerProvider prov, BeanProperty property)
        throws JsonMappingException {
    if (property != null) {
        JsonFormat.Value format = prov.getAnnotationIntrospector().findFormat(property.getMember());
        if (format != null && Objects.equals(BASE64_FORMAT, format.getPattern())) {
            return new Base64TransactionSerializer();
        }//from  w  ww. j  a va2s.  c  om
    }

    return new HexTransactionSerializer();
}

From source file:com.bitsofproof.dropwizard.supernode.jackson.TransactionSerializer.java

@Override
public JsonSerializer<?> createContextual(SerializerProvider prov, BeanProperty property)
        throws JsonMappingException {
    if (property != null) {
        JsonFormat.Value format = prov.getAnnotationIntrospector().findFormat((Annotated) property.getMember());
        if (format != null && Objects.equals(BASE64_FORMAT, format.getPattern())) {
            return new Base64TransactionSerializer();
        }//from   w w  w  .  j av  a 2 s .  c  o m
    }

    return new HexTransactionSerializer();
}