Open ljnelson opened 6 years ago
The following hack invoked from, say, a static initializer works around the problem:
private static final void hack() throws ReflectiveOperationException {
final Field jsonMapperField = Config.class.getDeclaredField("JSON_MAPPER");
assert jsonMapperField != null;
jsonMapperField.setAccessible(true);
final ObjectMapper objectMapper = (ObjectMapper)jsonMapperField.get(null);
assert objectMapper != null;
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
}
My
~/.docker/config
file can't be read by the docker-client project because of overly strict JSON mapping. I receive the following error:This is because my (perfectly valid)
~/.docker/config
file contains (among other valid things):Leaving aside code generation, building, etc. if the
DockerConfig.java
file were edited in such a way to include@JsonIgnoreProperties(ignoreUnknown = true)
that would be a quick fix.