JsonFormat.Value format = JsonFormat.Value.merge(formatFromAnnotation, formatOverride); if (format.getShape() == JsonFormat.Shape.OBJECT) { return null;
final JsonFormat.Value formatOverride = objectMapper.getSerializationConfig().getDefaultPropertyFormat(Map.Entry.class); final JsonFormat.Value formatFromAnnotation = propertyDescription.findExpectedFormat(null); final JsonFormat.Value format = JsonFormat.Value.merge(formatFromAnnotation, formatOverride); if (format.getShape() != JsonFormat.Shape.OBJECT) { propertyType = Utils.replaceRawClassInType(propertyType, Map.class);
JsonFormat.Value format = JsonFormat.Value.merge(formatFromAnnotation, formatOverride); if (format.getShape() == JsonFormat.Shape.OBJECT) { return null;
private void setShapeOverride(Class<?> cls, JsonFormat.Shape shape) { final MutableConfigOverride configOverride = objectMapper.configOverride(cls); configOverride.setFormat( JsonFormat.Value.merge( configOverride.getFormat(), JsonFormat.Value.forShape(shape))); }