Skip to content

State and contract of parser given to JsonbDeserializer is undefined #136

Open
@pdudits

Description

@pdudits

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationInvolves the spec or javadocsenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions