Java Code Examples for com.fasterxml.jackson.annotation.JsonTypeInfo.As#EXTERNAL_PROPERTY
The following examples show how to use
com.fasterxml.jackson.annotation.JsonTypeInfo.As#EXTERNAL_PROPERTY .
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: BeanSerializerFactory.java From bistoury with GNU General Public License v3.0 | 6 votes |
/** * Helper method called to ensure that we do not have "duplicate" type ids. * Added to resolve [databind#222] * * @since 2.6 */ protected List<BeanPropertyWriter> removeOverlappingTypeIds(SerializerProvider prov, BeanDescription beanDesc, BeanSerializerBuilder builder, List<BeanPropertyWriter> props) { for (int i = 0, end = props.size(); i < end; ++i) { BeanPropertyWriter bpw = props.get(i); TypeSerializer td = bpw.getTypeSerializer(); if ((td == null) || (td.getTypeInclusion() != As.EXTERNAL_PROPERTY)) { continue; } String n = td.getPropertyName(); PropertyName typePropName = PropertyName.construct(n); for (BeanPropertyWriter w2 : props) { if ((w2 != bpw) && w2.wouldConflictWithName(typePropName)) { bpw.assignTypeSerializer(null); break; } } } return props; }
Example 2
Source File: BeanSerializerFactory.java From lams with GNU General Public License v2.0 | 6 votes |
/** * Helper method called to ensure that we do not have "duplicate" type ids. * Added to resolve [databind#222] * * @since 2.6 */ protected List<BeanPropertyWriter> removeOverlappingTypeIds(SerializerProvider prov, BeanDescription beanDesc, BeanSerializerBuilder builder, List<BeanPropertyWriter> props) { for (int i = 0, end = props.size(); i < end; ++i) { BeanPropertyWriter bpw = props.get(i); TypeSerializer td = bpw.getTypeSerializer(); if ((td == null) || (td.getTypeInclusion() != As.EXTERNAL_PROPERTY)) { continue; } String n = td.getPropertyName(); PropertyName typePropName = PropertyName.construct(n); for (BeanPropertyWriter w2 : props) { if ((w2 != bpw) && w2.wouldConflictWithName(typePropName)) { bpw.assignTypeSerializer(null); break; } } } return props; }
Example 3
Source File: AsExternalTypeDeserializer.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public As getTypeInclusion() { return As.EXTERNAL_PROPERTY; }
Example 4
Source File: AsExternalTypeSerializer.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public As getTypeInclusion() { return As.EXTERNAL_PROPERTY; }