Skip to content

Commit 1b29d11

Browse files
authored
Update README.md
1 parent f8402f1 commit 1b29d11

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,13 @@ module explicitly.
7676

7777
## DeserializationFeature.FAIL_ON_NULL_CREATOR_PROPERTIES
7878

79-
It is recommended that Scala users enable `DeserializationFeature.FAIL_ON_NULL_CREATOR_PROPERTIES`. This feature means that when you
80-
deserialize JSON and bind to a Scala/Java class and a required field is missing (or null), then the deserialization call will fail
81-
with a `com.fasterxml.jackson.databind.exc.MismatchedInputException`. By default, the deserialization call will succeed and a `null` value
82-
will be set for the field.
79+
Since jackson-module-scala 2.19.0, if you deserializing a collection and the input is null, this will deserialize as an empty collection.
80+
81+
Up to jackson-module-scala 2.19.0, it was recommended that Scala users enable `DeserializationFeature.FAIL_ON_NULL_CREATOR_PROPERTIES` because
82+
otherwise, an input of null would lead to the deserialized instance having a null value for the collection field.
83+
84+
This feature means that when you deserialize JSON and bind to a Scala/Java class and a required field is missing (or null), then the deserialization call will fail
85+
with a `com.fasterxml.jackson.databind.exc.MismatchedInputException`.
8386

8487
```scala
8588
val mapper = JsonMapper.builder()

0 commit comments

Comments
 (0)