jakartaee / jakartaee/jsonb-api

Clarification: May JsonbDeserializer be non-public?

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

Description

I noticed that while Yasson is able to invoke non-public deserializers (as long as these are non-private), Johnzon (incl. 1.2.1) throws an exception for deserializers which are non-public: `Class org.apache.johnzon.jsonb.factory.SimpleJohnzonAdapterFactory can not access a member of class MyCustomJsonbDeserializer with modifiers "protected".

I checked the JSON-B spec and could not find any restriction whether or not deserializers MUST be public.

For improved portability of JSON-B applications and custom components, it would be beneficial to have a clear restriction told in the JSON-B specification whether deserializers MUST be public or not.

Contributor guide

Open the contributing guide

Research direction

Review the JSON-B specification's rules for custom deserializer visibility and compare them with the reported Johnzon 1.2.1 exception for a protected deserializer. Done means the specification clearly states whether non-public deserializers are allowed.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.