Boolean B = format.getFeature(JsonFormat.Feature.WRITE_SORTED_MAP_ENTRIES); if (B != null) { sortKeys = B.booleanValue();
Boolean B = format.getFeature(JsonFormat.Feature.ACCEPT_CASE_INSENSITIVE_PROPERTIES); if (B != null) { BeanPropertyMap propsOrig = _beanProperties;
ser = ser.withFormat(useTimestamp, dtf, shape); Boolean writeZoneId = format.getFeature(JsonFormat.Feature.WRITE_DATES_WITH_ZONE_ID); Boolean writeNanoseconds = format.getFeature(JsonFormat.Feature.WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS); if ((writeZoneId != null) || (writeNanoseconds != null)) { ser = ser.withFeatures(writeZoneId, writeNanoseconds);
/** * Convenience method that uses {@link #findFormatOverrides} to find possible * defaults and/of overrides, and then calls * <code>JsonFormat.Value.getFeature(feat)</code> * to find whether that feature has been specifically marked as enabled or disabled. * * @param typeForDefaults Type (erased) used for finding default format settings, if any * * @since 2.7 */ protected Boolean findFormatFeature(DeserializationContext ctxt, BeanProperty prop, Class<?> typeForDefaults, JsonFormat.Feature feat) { JsonFormat.Value format = findFormatOverrides(ctxt, prop, typeForDefaults); if (format != null) { return format.getFeature(feat); } return null; }
/** * Convenience method that uses {@link #findFormatOverrides} to find possible * defaults and/of overrides, and then calls <code>JsonFormat.Value.getFeature(...)</code> * to find whether that feature has been specifically marked as enabled or disabled. * * @param typeForDefaults Type (erased) used for finding default format settings, if any * * @since 2.7 */ protected Boolean findFormatFeature(SerializerProvider provider, BeanProperty prop, Class<?> typeForDefaults, JsonFormat.Feature feat) { JsonFormat.Value format = findFormatOverrides(provider, prop, typeForDefaults); if (format != null) { return format.getFeature(feat); } return null; }
@Override public JsonSerializer<?> createContextual(SerializerProvider serializers, BeanProperty property) throws JsonMappingException { Boolean unwrapSingle = null; // First: if we have a property, may have property-annotation overrides if (property != null) { JsonFormat.Value format = findFormatOverrides(serializers, property, handledType()); if (format != null) { unwrapSingle = format.getFeature(JsonFormat.Feature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED); if (unwrapSingle != _unwrapSingle) { return _withResolved(property, unwrapSingle); } } } return this; }
@Override public JsonSerializer<?> createContextual(SerializerProvider serializers, BeanProperty property) throws JsonMappingException { Boolean unwrapSingle = null; // First: if we have a property, may have property-annotation overrides if (property != null) { JsonFormat.Value format = findFormatOverrides(serializers, property, handledType()); if (format != null) { unwrapSingle = format.getFeature(JsonFormat.Feature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED); if (unwrapSingle != _unwrapSingle) { return _withResolved(property, unwrapSingle); } } } return this; }
/** * Convenience method that uses {@link #findFormatOverrides} to find possible * defaults and/of overrides, and then calls * <code>JsonFormat.Value.getFeature(feat)</code> * to find whether that feature has been specifically marked as enabled or disabled. * * @param typeForDefaults Type (erased) used for finding default format settings, if any * * @since 2.7 */ protected Boolean findFormatFeature(DeserializationContext ctxt, BeanProperty prop, Class<?> typeForDefaults, JsonFormat.Feature feat) { JsonFormat.Value format = findFormatOverrides(ctxt, prop, typeForDefaults); if (format != null) { return format.getFeature(feat); } return null; }
/** * Convenience method that uses {@link #findFormatOverrides} to find possible * defaults and/of overrides, and then calls <code>JsonFormat.Value.getFeature(...)</code> * to find whether that feature has been specifically marked as enabled or disabled. * * @param typeForDefaults Type (erased) used for finding default format settings, if any * * @since 2.7 */ protected Boolean findFormatFeature(SerializerProvider provider, BeanProperty prop, Class<?> typeForDefaults, JsonFormat.Feature feat) { JsonFormat.Value format = findFormatOverrides(provider, prop, typeForDefaults); if (format != null) { return format.getFeature(feat); } return null; }
@SuppressWarnings("unchecked") @Override public JsonDeserializer<T> createContextual(DeserializationContext ctxt, BeanProperty property) throws JsonMappingException { InstantDeserializer<T> deserializer = (InstantDeserializer<T>)super.createContextual(ctxt, property); if (deserializer != this) { JsonFormat.Value val = findFormatOverrides(ctxt, property, handledType()); if (val != null) { return new InstantDeserializer<>(deserializer, val.getFeature(JsonFormat.Feature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE)); } } return this; }
@SuppressWarnings("unchecked") @Override public JsonDeserializer<T> createContextual(DeserializationContext ctxt, BeanProperty property) throws JsonMappingException { InstantDeserializer<T> deserializer = (InstantDeserializer<T>)super.createContextual(ctxt, property); if (deserializer != this) { JsonFormat.Value val = findFormatOverrides(ctxt, property, handledType()); if (val != null) { return new InstantDeserializer<>(deserializer, val.getFeature(JsonFormat.Feature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE)); } } return this; }
Boolean B = format.getFeature(JsonFormat.Feature.WRITE_SORTED_MAP_ENTRIES); if (B != null) { sortKeys = B.booleanValue();
public JacksonJodaDateFormat with(JsonFormat.Value ann) { JacksonJodaDateFormat format = this; format = format.withLocale(ann.getLocale()); format = format.withTimeZone(ann.getTimeZone()); format = format.withFormat(ann.getPattern().trim()); Boolean adjustTZ = ann.getFeature(JsonFormat.Feature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE); Boolean writeZoneId = ann.getFeature(JsonFormat.Feature.WRITE_DATES_WITH_ZONE_ID); if ((adjustTZ != _adjustToContextTZOverride) || (writeZoneId != _writeZoneId)) { format = new JacksonJodaDateFormat(format, adjustTZ, writeZoneId); } return format; }
unwrapSingle = format.getFeature(JsonFormat.Feature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED);
unwrapSingle = format.getFeature(JsonFormat.Feature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED);
unwrapSingle = format.getFeature(JsonFormat.Feature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED);
@SuppressWarnings("unchecked") @Override public JsonDeserializer<T> createContextual(DeserializationContext ctxt, BeanProperty property) throws JsonMappingException { InstantDeserializer<T> deserializer = (InstantDeserializer<T>)super.createContextual(ctxt, property); if (deserializer != this) { JsonFormat.Value val = findFormatOverrides(ctxt, property, handledType()); if (val != null) { return new InstantDeserializer<>(deserializer, val.getFeature(JsonFormat.Feature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE)); } } return this; }
/** * Convenience method that uses {@link #findFormatOverrides} to find possible * defaults and/of overrides, and then calls * <code>JsonFormat.Value.getFeature(feat)</code> * to find whether that feature has been specifically marked as enabled or disabled. * * @param typeForDefaults Type (erased) used for finding default format settings, if any * * @since 2.7 */ protected Boolean findFormatFeature(DeserializationContext ctxt, BeanProperty prop, Class<?> typeForDefaults, JsonFormat.Feature feat) { JsonFormat.Value format = findFormatOverrides(ctxt, prop, typeForDefaults); if (format != null) { return format.getFeature(feat); } return null; }
/** * Convenience method that uses {@link #findFormatOverrides} to find possible * defaults and/of overrides, and then calls <code>JsonFormat.Value.getFeature(...)</code> * to find whether that feature has been specifically marked as enabled or disabled. * * @param typeForDefaults Type (erased) used for finding default format settings, if any * * @since 2.7 */ protected Boolean findFormatFeature(SerializerProvider provider, BeanProperty prop, Class<?> typeForDefaults, JsonFormat.Feature feat) { JsonFormat.Value format = findFormatOverrides(provider, prop, typeForDefaults); if (format != null) { return format.getFeature(feat); } return null; }
@Override public JsonSerializer<?> createContextual(SerializerProvider serializers, BeanProperty property) throws JsonMappingException { Boolean unwrapSingle = null; // First: if we have a property, may have property-annotation overrides if (property != null) { JsonFormat.Value format = findFormatOverrides(serializers, property, handledType()); if (format != null) { unwrapSingle = format.getFeature(JsonFormat.Feature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED); if (unwrapSingle != _unwrapSingle) { return _withResolved(property, unwrapSingle); } } } return this; }