public static ObjectMapper getOperatorValueSerializer() { ObjectMapper returnVal = new ObjectMapper(); returnVal.setVisibilityChecker(new VC()); returnVal.configure(org.codehaus.jackson.map.SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false); returnVal.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL, As.WRAPPER_OBJECT); returnVal.setSerializationInclusion(JsonSerialize.Inclusion.NON_NULL); return returnVal; }
public static ObjectMapper getOperatorValueDeserializer() { ObjectMapper returnVal = new ObjectMapper(); returnVal.setVisibilityChecker(new VC()); returnVal.configure(org.codehaus.jackson.map.DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false); returnVal.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL, As.WRAPPER_OBJECT); return returnVal; }
public StdTypeResolverBuilder inclusion(JsonTypeInfo.As paramAs) { if (paramAs == null) throw new IllegalArgumentException("includeAs can not be null"); this._includeAs = paramAs; return this; }
@Override @XmlElementRefs({ @XmlElementRef(type = org.tanaguru.entity.subject.PageImpl.class), @XmlElementRef(type = org.tanaguru.entity.subject.SiteImpl.class)}) @JsonTypeInfo(use=JsonTypeInfo.Id.NAME, include=As.WRAPPER_OBJECT) @JsonSubTypes({ @JsonSubTypes.Type(value=org.tanaguru.entity.subject.PageImpl.class, name="Page"), @JsonSubTypes.Type(value=org.tanaguru.entity.subject.SiteImpl.class, name="Site")}) public WebResourceImpl getSubject() { return subject; }
@Override @JsonTypeInfo(use=JsonTypeInfo.Id.NAME, include=As.WRAPPER_OBJECT) @JsonSubTypes({ @JsonSubTypes.Type(value=org.tanaguru.entity.parameterization.ParameterImpl.class, name="Parameter")}) public Collection<Parameter> getParameterSet() { if (this.parameterSet == null) { this.parameterSet = new HashSet<>(); } return (Collection)parameterSet; }
public JsonTypeInfo.As getTypeInclusion() { return JsonTypeInfo.As.PROPERTY; }
public JsonTypeInfo.As getTypeInclusion() { return JsonTypeInfo.As.WRAPPER_ARRAY; }
public JsonTypeInfo.As getTypeInclusion() { return JsonTypeInfo.As.WRAPPER_OBJECT; }
public ObjectMapper enableDefaultTyping(DefaultTyping paramDefaultTyping) { return enableDefaultTyping(paramDefaultTyping, JsonTypeInfo.As.WRAPPER_ARRAY); }
public ObjectMapper enableDefaultTyping(DefaultTyping paramDefaultTyping, JsonTypeInfo.As paramAs) { return setDefaultTyping(new DefaultTypeResolverBuilder(paramDefaultTyping).init(JsonTypeInfo.Id.CLASS, null).inclusion(paramAs)); }
public ObjectMapper enableDefaultTypingAsProperty(DefaultTyping paramDefaultTyping, String paramString) { return setDefaultTyping(new DefaultTypeResolverBuilder(paramDefaultTyping).init(JsonTypeInfo.Id.CLASS, null).inclusion(JsonTypeInfo.As.PROPERTY).typeProperty(paramString)); }
public JsonTypeInfo.As getTypeInclusion() { return JsonTypeInfo.As.EXTERNAL_PROPERTY; }
public void resolve(DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider) { Iterator localIterator1 = this._beanProperties.allProperties(); Object localObject1 = null; UnwrappedPropertyHandler localUnwrappedPropertyHandler = null; SettableBeanProperty localSettableBeanProperty2; if (localIterator1.hasNext()) { localSettableBeanProperty2 = (SettableBeanProperty)localIterator1.next(); if (localSettableBeanProperty2.hasValueDeserializer()) break label490; } label490: for (SettableBeanProperty localSettableBeanProperty3 = localSettableBeanProperty2.withValueDeserializer(findDeserializer(paramDeserializationConfig, paramDeserializerProvider, localSettableBeanProperty2.getType(), localSettableBeanProperty2)); ; localSettableBeanProperty3 = localSettableBeanProperty2) { SettableBeanProperty localSettableBeanProperty4 = _resolveManagedReferenceProperty(paramDeserializationConfig, localSettableBeanProperty3); SettableBeanProperty localSettableBeanProperty5 = _resolveUnwrappedProperty(paramDeserializationConfig, localSettableBeanProperty4); if (localSettableBeanProperty5 != null) { if (localUnwrappedPropertyHandler == null) localUnwrappedPropertyHandler = new UnwrappedPropertyHandler(); localUnwrappedPropertyHandler.addProperty(localSettableBeanProperty5); } while (true) { SettableBeanProperty localSettableBeanProperty6 = _resolveInnerClassValuedProperty(paramDeserializationConfig, localSettableBeanProperty5); if (localSettableBeanProperty6 != localSettableBeanProperty2) this._beanProperties.replace(localSettableBeanProperty6); if (!localSettableBeanProperty6.hasValueTypeDeserializer()) break; TypeDeserializer localTypeDeserializer = localSettableBeanProperty6.getValueTypeDeserializer(); if (localTypeDeserializer.getTypeInclusion() != JsonTypeInfo.As.EXTERNAL_PROPERTY) break; if (localObject1 == null); for (Object localObject2 = new ExternalTypeHandler.Builder(); ; localObject2 = localObject1) { ((ExternalTypeHandler.Builder)localObject2).addExternal(localSettableBeanProperty6, localTypeDeserializer.getPropertyName()); this._beanProperties.remove(localSettableBeanProperty6); localObject1 = localObject2; break; if ((this._anySetter != null) && (!this._anySetter.hasValueDeserializer())) this._anySetter = this._anySetter.withValueDeserializer(findDeserializer(paramDeserializationConfig, paramDeserializerProvider, this._anySetter.getType(), this._anySetter.getProperty())); if (this._valueInstantiator.canCreateUsingDelegate()) { JavaType localJavaType = this._valueInstantiator.getDelegateType(); if (localJavaType == null) throw new IllegalArgumentException("Invalid delegate-creator definition for " + this._beanType + ": value instantiator (" + this._valueInstantiator.getClass().getName() + ") returned true for 'canCreateUsingDelegate()', but null for 'getDelegateType()'"); AnnotatedWithParams localAnnotatedWithParams = this._valueInstantiator.getDelegateCreator(); this._delegateDeserializer = findDeserializer(paramDeserializationConfig, paramDeserializerProvider, localJavaType, new BeanProperty.Std(null, localJavaType, this._forClass.getAnnotations(), localAnnotatedWithParams)); } if (this._propertyBasedCreator != null) { Iterator localIterator2 = this._propertyBasedCreator.getCreatorProperties().iterator(); while (localIterator2.hasNext()) { SettableBeanProperty localSettableBeanProperty1 = (SettableBeanProperty)localIterator2.next(); if (!localSettableBeanProperty1.hasValueDeserializer()) this._propertyBasedCreator.assignDeserializer(localSettableBeanProperty1, findDeserializer(paramDeserializationConfig, paramDeserializerProvider, localSettableBeanProperty1.getType(), localSettableBeanProperty1)); } } if (localObject1 != null) { this._externalTypeIdHandler = localObject1.build(); this._nonStandardCreation = true; } this._unwrappedPropertyHandler = localUnwrappedPropertyHandler; if (localUnwrappedPropertyHandler != null) this._nonStandardCreation = true; return; } localSettableBeanProperty5 = localSettableBeanProperty4; } } }
public abstract JsonTypeInfo.As getTypeInclusion();
public abstract T inclusion(JsonTypeInfo.As paramAs);