Skip to content

forValueNulls Introduced in Jackson 2.9 Ignored #356

Closed
@neilchaudhuri

Description

@neilchaudhuri

Given this case class:

case class Value( @JsonSetter(nulls=Nulls.FAIL) offers: Map[String, Offer] = Map.empty[String, Offer] )

and this JSON:

{ "offers": null }

There is no failure on deserialization. I have also tried setting the value globally on ObjectMapper:

objectMapper.setDefaultSetterInfo(JsonSetter.Value.forValueNulls(Nulls.FAIL))

This doesn't work either.

Am I doing something wrong? Or is this a bug?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions