Skip to content

Commit

Permalink
set objectMapper to ignore unknown fields by default (Consensys#5663)
Browse files Browse the repository at this point in the history
* set objectMapper to ignore unknown fields by default

JsonProvider broke on a previous release because of an extra field, which shouldnt happen.

Disabled the exception thrown when an unknown object attribute occurs via JsonProvider.

Signed-off-by: Paul Harris <[email protected]>
  • Loading branch information
rolfyone authored Jun 1, 2022
1 parent 2a71c8a commit 0e6f876
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.Version;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.module.SimpleModule;
import org.apache.tuweni.bytes.Bytes;
Expand Down Expand Up @@ -97,6 +98,7 @@ private void addTekuMappers() {

public JsonProvider() {
objectMapper = new ObjectMapper();
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
addTekuMappers();
}

Expand Down

0 comments on commit 0e6f876

Please sign in to comment.