com.fasterxml.jackson.databind.jsontype.impl.AsArrayTypeSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ehcache Show documentation
Show all versions of ehcache Show documentation
Ehcache is an open source, standards-based cache used to boost performance,
offload the database and simplify scalability. Ehcache is robust, proven and full-featured and
this has made it the most widely-used Java-based cache.
package com.fasterxml.jackson.databind.jsontype.impl;
import com.fasterxml.jackson.annotation.JsonTypeInfo.As;
import com.fasterxml.jackson.databind.BeanProperty;
import com.fasterxml.jackson.databind.jsontype.TypeIdResolver;
/**
* Type serializer that will embed type information in an array,
* as the first element, and actual value as the second element.
*/
public class AsArrayTypeSerializer extends TypeSerializerBase
{
public AsArrayTypeSerializer(TypeIdResolver idRes, BeanProperty property) {
super(idRes, property);
}
@Override
public AsArrayTypeSerializer forProperty(BeanProperty prop) {
return (_property == prop) ? this : new AsArrayTypeSerializer(_idResolver, prop);
}
@Override
public As getTypeInclusion() { return As.WRAPPER_ARRAY; }
}