FasterXML / FasterXML/jackson-databind

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

Open
#230 9 comments 7 reactions 0 assignees View on GitHub
3.x most-wanted
Dominant language
Java
Stars
3.7k
Forks
1.5k
Avg merge
3d 6h
Merged PRs (30d)
28

Description

(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

NOTE: also as per #2618 affects Builder-style deserialization too.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.