Skip to content

Add support for basic "is-required" checks on deserialization using @JsonProperty(required=true) #230

@cowtowncoder

Description

@cowtowncoder

(note: moved from https://jira.codehaus.org/browse/JACKSON-767)


As per title, although full validation of values is out-of-scope for Jackson, very basic "must be included in JSON" checks may fall in 80/20 line of things. Especially since we already have annotation to use.

The trick here is implementation; from two distinct parts:

  1. This requires handling and retaining of extra state (what has been included) during deserialization by BeanDeserializer, and passing it; not trivial to do with current code.
  2. Due to combinatorial explosion by features, efficiency, we need to be careful not to add Yet Another combination of things to tackle, requiring adding yet more similar (but not identical) methods

Metadata

Metadata

Assignees

No one assigned

    Labels

    most-wantedTag to indicate that there is heavy user +1'ing action

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions