Skip to content

Commit 8605b61

Browse files
authored
Merge pull request steve-community#1460 from shizen-connect/feature/not-fail-on-unknown-properties
Feature/not fail on receiving with unknown ocpp properties
2 parents 5393e16 + 84fb865 commit 8605b61

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/de/rwth/idsg/steve/ocpp/ws/JsonObjectMapper.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030

3131
import static com.fasterxml.jackson.core.JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN;
3232
import static com.fasterxml.jackson.databind.DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES;
33+
import static com.fasterxml.jackson.databind.DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES;
3334

3435
/**
3536
* Because ObjectMapper can and should be reused, if config does not change after init.
@@ -57,6 +58,8 @@ public enum JsonObjectMapper {
5758

5859
mapper.configure(WRITE_BIGDECIMAL_AS_PLAIN, true);
5960

61+
mapper.configure(FAIL_ON_UNKNOWN_PROPERTIES, false);
62+
6063
mapper.registerModule(new CustomStringModule());
6164
mapper.registerModule(new Ocpp12JacksonModule());
6265
mapper.registerModule(new Ocpp15JacksonModule());

0 commit comments

Comments
 (0)