jakartaee / jakartaee/jsonb-api

Specification is not clear about null handling for Collections

Open
#118 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation enhancement
Dominant language
Java
Stars
95
Forks
41
Avg merge
1d 6h
Merged PRs (30d)
35

Description

[The specification document](https://download.oracle.com/otndocs/jcp/json_b-1-final-eval-spec/index.html) is clear about null serialization for Arrays (section 3.14.2) however it is not clear about nulls and collections.

Yasson by default omits javabean properties with null values during serialization, but treats collections same as arrays, resulting in preserving nulls for them in JSON document. Is that behaviour correct? If so can section 3.14.2 be updated to include collections?

Related to: [https://github.com/eclipse-ee4j/yasson/issues/233](https://github.com/eclipse-ee4j/yasson/issues/233)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with section 3.14.2 of the linked JSON-B specification and compare its array null-handling language with the collection behavior described here. Review the related Yasson issue 233 for context; the work is done when the expected collection behavior is decided and the specification wording is updated if needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.