Commit fba91374 authored by Karsten Loesing's avatar Karsten Loesing
Browse files

Ignore unknown fields in index.json.

This is required for processing index.json files produced by CollecTor
1.13.0 or higher. We don't need those newly added fields or any other
fields added in the future. But we must not fail when fields are
added.
parent 8763af44
# Changes in version 2.?.? - 2019-1?-??
# Changes in version 2.9.1 - 2019-11-09
* Minor changes
- Do not fail when processing index.json files with unknown fields.
# Changes in version 2.9.0 - 2019-11-01
......
......@@ -10,6 +10,7 @@ import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
......@@ -54,7 +55,8 @@ public class IndexNode {
.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE)
.setSerializationInclusion(JsonInclude.Include.NON_EMPTY)
.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.NONE)
.setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY);
.setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY)
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
/** The created date-time is exposed in JSON as 'index_created' field. */
@JsonProperty("index_created")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment