Java Code Examples for com.fasterxml.jackson.databind.ser.impl.PropertySerializerMap#emptyForProperties()

The following examples show how to use com.fasterxml.jackson.databind.ser.impl.PropertySerializerMap#emptyForProperties() . 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: MapSerializer.java    From lams with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @since 2.5
 */
@SuppressWarnings("unchecked")
protected MapSerializer(Set<String> ignoredEntries,
        JavaType keyType, JavaType valueType, boolean valueTypeIsStatic,
        TypeSerializer vts,
        JsonSerializer<?> keySerializer, JsonSerializer<?> valueSerializer)
{
    super(Map.class, false);
    _ignoredEntries = ((ignoredEntries == null) || ignoredEntries.isEmpty())
            ? null : ignoredEntries;
    _keyType = keyType;
    _valueType = valueType;
    _valueTypeIsStatic = valueTypeIsStatic;
    _valueTypeSerializer = vts;
    _keySerializer = (JsonSerializer<Object>) keySerializer;
    _valueSerializer = (JsonSerializer<Object>) valueSerializer;
    _dynamicValueSerializers = PropertySerializerMap.emptyForProperties();
    _property = null;
    _filterId = null;
    _sortKeys = false;
    _suppressableValue = null;
    _suppressNulls = false;
}
 
Example 2
Source File: AsArraySerializerBase.java    From lams with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @deprecated Since 2.6 Use variants that either take 'src', or do NOT pass
 *    BeanProperty
 */
@Deprecated
protected AsArraySerializerBase(Class<?> cls, JavaType et, boolean staticTyping,
        TypeSerializer vts, BeanProperty property, JsonSerializer<Object> elementSerializer)
{
    // typing with generics is messy... have to resort to this:
    super(cls, false);
    _elementType = et;
    // static if explicitly requested, or if element type is final
    _staticTyping = staticTyping || (et != null && et.isFinal());
    _valueTypeSerializer = vts;
    _property = property;
    _elementSerializer = elementSerializer;
    _dynamicSerializers = PropertySerializerMap.emptyForProperties();
    _unwrapSingle = null;
}
 
Example 3
Source File: ObjectArraySerializer.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
public ObjectArraySerializer(JavaType elemType, boolean staticTyping,
        TypeSerializer vts, JsonSerializer<Object> elementSerializer)
{
    super(Object[].class);
    _elementType = elemType;
    _staticTyping = staticTyping;
    _valueTypeSerializer = vts;
    _dynamicSerializers = PropertySerializerMap.emptyForProperties();
    _elementSerializer = elementSerializer;
}
 
Example 4
Source File: ReferenceTypeSerializer.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
public ReferenceTypeSerializer(ReferenceType fullType, boolean staticTyping,
        TypeSerializer vts, JsonSerializer<Object> ser)
{
    super(fullType);
    _referredType = fullType.getReferencedType();
    _property = null;
    _valueTypeSerializer = vts;
    _valueSerializer = ser;
    _unwrapper = null;
    _suppressableValue = null;
    _suppressNulls = false;
    _dynamicSerializers = PropertySerializerMap.emptyForProperties();
}
 
Example 5
Source File: AsArraySerializerBase.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Non-contextual, "blueprint" constructor typically called when the first
 * instance is created, without knowledge of property it was used via.
 *
 * @since 2.6
 */
protected AsArraySerializerBase(Class<?> cls, JavaType et, boolean staticTyping,
        TypeSerializer vts, JsonSerializer<Object> elementSerializer)
{
    super(cls, false);
    _elementType = et;
    // static if explicitly requested, or if element type is final
    _staticTyping = staticTyping || (et != null && et.isFinal());
    _valueTypeSerializer = vts;
    _property = null;
    _elementSerializer = elementSerializer;
    _dynamicSerializers = PropertySerializerMap.emptyForProperties();
    _unwrapSingle = null;
}
 
Example 6
Source File: StdKeySerializers.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
public Dynamic() {
    super(String.class, false);
    _dynamicSerializers = PropertySerializerMap.emptyForProperties();
}
 
Example 7
Source File: StdKeySerializers.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
Object readResolve() {
    // Since it's transient, and since JDK serialization by-passes ctor, need this:
    _dynamicSerializers = PropertySerializerMap.emptyForProperties();
    return this;
}