jakartaee / jakartaee/jsonb-api

State and contract of parser given to JsonbDeserializer is undefined

Open
#136 0 comments 0 reactions 0 assignees View on GitHub
documentation enhancement
Dominant language
Java
Stars
95
Forks
41
Avg merge
1d 6h
Merged PRs (30d)
35

Description

The spec neither javadoc describes what is the parser 'looking at' when passed to user deserializer and if it is scoped in any way, and curent implementations vary in their behavior.

Proposal would be:

Provided JSON Parser will provide user serializer with all events that make up single JSON Value.
For example, when deserializing a JSON Object, the first event returned from `parser.next()` will be `Event.START_OBJECT`, and then followed by all events until matching `Event.END_OBJECT` is reached.
For primitive JSON values (String, Number, boolean literals and null), only single event is offered describing the value is offered to deserializer.
For deserialization of arrays, the first event offered is `Event.START_ARRAY` and last is matching `Event.END_ARRAY`.

Contributor guide

Open the contributing guide

Research direction

The issue names the JSON parser, user deserializer, and parser.next() but no repository files or tests. Start by locating the JSON-B specification and Javadoc covering deserialization, then compare the stated event-sequence proposal with current implementations. Done means the parser state and event scope are resolved and consistently specified.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.