protected PropertyBuilder constructPropertyBuilder(SerializationConfig config, BeanDescription beanDesc) { return new PropertyBuilder(config, beanDesc); }
/** * Accessor used to find out "default value" for given property, to use for * comparing values to serialize, to determine whether to exclude value from serialization with * inclusion type of {@link com.fasterxml.jackson.annotation.JsonInclude.Include#NON_DEFAULT}. * This method is called when we specifically want to know default value within context * of a POJO, when annotation is within containing class, and not for property or * defined as global baseline. *<p> * Note that returning of pseudo-type * {@link com.fasterxml.jackson.annotation.JsonInclude.Include#NON_EMPTY} requires special handling. * * @since 2.7 * @deprecated Since 2.9 since this will not allow determining difference between "no default instance" * case and default being `null`. */ @Deprecated // since 2.9 protected Object getPropertyDefaultValue(String name, AnnotatedMember member, JavaType type) { Object defaultBean = getDefaultBean(); if (defaultBean == null) { return getDefaultValue(type); } try { return member.getValue(defaultBean); } catch (Exception e) { return _throwWrapped(e, name, defaultBean); } }
serializationType = findSerializationType(am, defaultUseStaticTyping, declaredType); } catch (JsonMappingException e) { return prov.reportBadPropertyDefinition(_beanDesc, propDef, e.getMessage()); if (_useRealPropertyDefaults && (defaultBean = getDefaultBean()) != null) { valueToSuppress = am.getValue(defaultBean); } catch (Exception e) { _throwWrapped(e, propDef.getName(), defaultBean); valueToSuppress = getDefaultValue(actualType); suppressNulls = true;
serializationType = findSerializationType(am, defaultUseStaticTyping, declaredType); } catch (JsonMappingException e) { if (propDef == null) { if (_useRealPropertyDefaults && (defaultBean = getDefaultBean()) != null) { valueToSuppress = am.getValue(defaultBean); } catch (Exception e) { _throwWrapped(e, propDef.getName(), defaultBean);
protected Object getDefaultValue(String name, AnnotatedMember member) { Object defaultBean = getDefaultBean(); try { return member.getValue(defaultBean); } catch (Exception e) { return _throwWrapped(e, name, defaultBean); } }
JavaType serializationType = findSerializationType(am, defaultUseStaticTyping, declaredType); switch (methodProps) { case NON_DEFAULT: valueToSuppress = getDefaultValue(propDef.getName(), am); if (valueToSuppress == null) { suppressNulls = true;
BeanProperty.Std property = new BeanProperty.Std(name, type, pb.getClassAnnotations(), accessor); BeanPropertyWriter pbw = pb.buildWriter(propDef, type, annotatedSerializer, typeSer, contentTypeSer, accessor, staticTyping); return pbw;
return pb.buildWriter(prov, propDef, type, annotatedSerializer, typeSer, contentTypeSer, accessor, staticTyping);
serializationType = findSerializationType(am, defaultUseStaticTyping, declaredType); } catch (JsonMappingException e) { if (propDef == null) { if (_useRealPropertyDefaults && (defaultBean = getDefaultBean()) != null) { valueToSuppress = am.getValue(defaultBean); } catch (Exception e) { _throwWrapped(e, propDef.getName(), defaultBean);
protected Object getDefaultValue(String name, AnnotatedMember member) { Object defaultBean = getDefaultBean(); try { return member.getValue(defaultBean); } catch (Exception e) { return _throwWrapped(e, name, defaultBean); } }
JavaType serializationType = findSerializationType(am, defaultUseStaticTyping, declaredType); switch (methodProps) { case NON_DEFAULT: valueToSuppress = getDefaultValue(propDef.getName(), am); if (valueToSuppress == null) { suppressNulls = true;
JavaType type = accessor.getType(); BeanProperty.Std property = new BeanProperty.Std(name, type, propDef.getWrapperName(), pb.getClassAnnotations(), accessor, propDef.getMetadata()); return pb.buildWriter(prov, propDef, type, annotatedSerializer, typeSer, contentTypeSer, accessor, staticTyping);
return pb.buildWriter(prov, propDef, type, annotatedSerializer, typeSer, contentTypeSer, accessor, staticTyping);
/** * Accessor used to find out "default value" for given property, to use for * comparing values to serialize, to determine whether to exclude value from serialization with * inclusion type of {@link com.fasterxml.jackson.annotation.JsonInclude.Include#NON_DEFAULT}. * This method is called when we specifically want to know default value within context * of a POJO, when annotation is within containing class, and not for property or * defined as global baseline. *<p> * Note that returning of pseudo-type * {@link com.fasterxml.jackson.annotation.JsonInclude.Include#NON_EMPTY} requires special handling. * * @since 2.7 * @deprecated Since 2.8.5 since this will not allow determining difference between "no default instance" * case and default being `null`. */ @Deprecated // since 2.8.5 protected Object getPropertyDefaultValue(String name, AnnotatedMember member, JavaType type) { Object defaultBean = getDefaultBean(); if (defaultBean == null) { return getDefaultValue(type); } try { return member.getValue(defaultBean); } catch (Exception e) { return _throwWrapped(e, name, defaultBean); } }
protected Object getDefaultValue(String name, AnnotatedMember member) { Object defaultBean = getDefaultBean(); try { return member.getValue(defaultBean); } catch (Exception e) { return _throwWrapped(e, name, defaultBean); } }
JavaType serializationType = findSerializationType(am, defaultUseStaticTyping, declaredType); switch (inclusion) { case NON_DEFAULT: valueToSuppress = getDefaultValue(propDef.getName(), am); if (valueToSuppress == null) { suppressNulls = true;
BeanProperty.Std property = new BeanProperty.Std(name, type, pb.getClassAnnotations(), accessor); BeanPropertyWriter pbw = pb.buildWriter(propDef, type, annotatedSerializer, typeSer, contentTypeSer, accessor, staticTyping); return pbw;
protected PropertyBuilder constructPropertyBuilder(SerializationConfig config, BeanDescription beanDesc) { return new PropertyBuilder(config, beanDesc); }
/** * Accessor used to find out "default value" for given property, to use for * comparing values to serialize, to determine whether to exclude value from serialization with * inclusion type of {@link com.fasterxml.jackson.annotation.JsonInclude.Include#NON_DEFAULT}. * This method is called when we specifically want to know default value within context * of a POJO, when annotation is within containing class, and not for property or * defined as global baseline. *<p> * Note that returning of pseudo-type * {@link com.fasterxml.jackson.annotation.JsonInclude.Include#NON_EMPTY} requires special handling. * * @since 2.7 * @deprecated Since 2.9 since this will not allow determining difference between "no default instance" * case and default being `null`. */ @Deprecated // since 2.9 protected Object getPropertyDefaultValue(String name, AnnotatedMember member, JavaType type) { Object defaultBean = getDefaultBean(); if (defaultBean == null) { return getDefaultValue(type); } try { return member.getValue(defaultBean); } catch (Exception e) { return _throwWrapped(e, name, defaultBean); } }
protected Object getDefaultValue(String name, AnnotatedMember member) { Object defaultBean = getDefaultBean(); try { return member.getValue(defaultBean); } catch (Exception e) { return _throwWrapped(e, name, defaultBean); } }