Skip to content

Commit

Permalink
Merge pull request #1460 from shizen-connect/feature/not-fail-on-unkn…
Browse files Browse the repository at this point in the history
…own-properties

Feature/not fail on receiving with unknown ocpp properties
  • Loading branch information
goekay committed Jun 19, 2024
2 parents 5393e16 + 84fb865 commit 8605b61
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

import static com.fasterxml.jackson.core.JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN;
import static com.fasterxml.jackson.databind.DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES;
import static com.fasterxml.jackson.databind.DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES;

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

mapper.configure(WRITE_BIGDECIMAL_AS_PLAIN, true);

mapper.configure(FAIL_ON_UNKNOWN_PROPERTIES, false);

mapper.registerModule(new CustomStringModule());
mapper.registerModule(new Ocpp12JacksonModule());
mapper.registerModule(new Ocpp15JacksonModule());
Expand Down

0 comments on commit 8605b61

Please sign in to comment.