jasminb / jsonapi-converter

JSONAPI-Converter is a Java/Android library that provides support for working with JSONAPI spec
Apache License 2.0
272 stars 81 forks source link

How to configure ObjectMapper? #239

Closed metschesd closed 4 years ago

metschesd commented 4 years ago

Is there a way to configure Jackson's ObjectMapper which is used in the converter? I would like to ignore unkown properties like this:

ObjectMapper mapper = new ObjectMapper()
      .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
metschesd commented 4 years ago

Found it myself. Should have read the code earlier...

resourceConverter = new ResourceConverter(mapper, ...);

does the trick.

jasminb commented 4 years ago

Glad you were able to resolve it for yourself. Closing the issue.