Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/not fail on receiving with unknown ocpp properties #1460

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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