Add new method(s) in serializer/deserializer factory for accessing only "POJO" (de)serializer

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

Nobody has claimed this yet.

Assessment

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

Research direction

Start by reviewing the existing serializer/deserializer factory lookup APIs and the Enum and POJO handling described in the issue. Trace how BeanSerializer is selected today, then determine the 3.x factory methods needed to request POJO serializers directly; done means shape-changing cases can select the POJO serializer without relying on the general Java-type lookup.

Written by the indexing model from the issue text.

Description

enhancement

Although lookups by general Java type (Collection(-like), Map(-like), array, Enum, reference type, "other") works well for registering custom (de)serializers, there is one set of functionality where it is not sufficient: that of "shape-changing".

For example, when serializing Enum values "as POJOs" (by inspecting properties), lookup is needed ONLY for POJO serializer (BeanSerializer), and not for Enum type. But currently there is no way to explicitly specify desire for such (de)serializer. This requires clumsy work-arounds on factories, lack of extensibility. With 3.x we can add new methods to overcome this problem.

Dominant language
No language data
Stars
6
Forks
0
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

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.

More from FasterXML/jackson3-dev

All issues in FasterXML/jackson3-dev

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.