Skip to content

Remove ObjectCodec: replace with ObjectWriteContext / ObjectReadContext #413

@cowtowncoder

Description

@cowtowncoder

Problem with ObjectCodec is that it refers to general "factory" entity (like ObjectMapper), so to read/write anything it is necessary to create active instances, but ones that are not (as of Jackson 2.x) carried through processing pipeline. This means that new distinct contexts are created, which not only add overhead (which may or may not be big issue) but also remove possible settings that reader/writer would have, as well as any state (context attributes).

So for 3.0 let's replace codec abstraction with separate stateful abstractions, work that has already started. Essentially:

  • ObjectReadContext will be used both for accessing necessary reader (parser) configuration, overrides AND state of deserialization.
  • ObjectWriteContext will be used both for accessing writer (generator) configuration, overrides AND state of serialization process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.xIssues to be only tackled for Jackson 3.x, not 2.x

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions