use of org.devgateway.ocds.web.rest.serializers.GeoJsonPointSerializer in project oc-explorer by devgateway.
the class MvcConfig method objectMapperBuilder.
@Bean
public Jackson2ObjectMapperBuilder objectMapperBuilder() {
Jackson2ObjectMapperBuilder builder = new Jackson2ObjectMapperBuilder();
// builder.featuresToEnable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
SimpleDateFormat dateFormatGmt = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
dateFormatGmt.setTimeZone(TimeZone.getTimeZone("GMT"));
builder.serializationInclusion(Include.NON_EMPTY).dateFormat(dateFormatGmt);
builder.serializerByType(GeoJsonPoint.class, new GeoJsonPointSerializer());
builder.serializerByType(ObjectId.class, new ToStringSerializer());
builder.defaultViewInclusion(true);
return builder;
}
use of org.devgateway.ocds.web.rest.serializers.GeoJsonPointSerializer in project ocvn by devgateway.
the class MvcConfig method objectMapperBuilder.
@Bean
public Jackson2ObjectMapperBuilder objectMapperBuilder() {
Jackson2ObjectMapperBuilder builder = new Jackson2ObjectMapperBuilder();
//builder.featuresToEnable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
SimpleDateFormat dateFormatGmt = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
dateFormatGmt.setTimeZone(TimeZone.getTimeZone("GMT"));
builder.serializationInclusion(Include.NON_EMPTY).dateFormat(dateFormatGmt);
builder.serializerByType(GeoJsonPoint.class, new GeoJsonPointSerializer());
builder.serializerByType(ObjectId.class, new ToStringSerializer());
builder.defaultViewInclusion(true);
return builder;
}
Aggregations