Skip to content

Add RawValue helper type #743

@cowtowncoder

Description

@cowtowncoder

(note: related to #737, #348)

Supporting handling of "raw values" is tricky due to various reasons. But one possibly workable way would be to allow passing of raw values as JsonToken.VALUE_EMBEDDED_OBJECT of specific type.
Since there is nothing existing that quite fits the use case it is probably best to just add a simple value type in com.fasterxml.jackson.databind.util, say, "JsonRawValue".
It should be possible to construct from java.lang.String, but possible also from other sources to support alternate forms of writeRawValue().
The main method for accessing data should be one to simply write contents using given JsonGenerator, but alternate accessors may be added as well.

Once this type is added, it should be possible to work on end-to-end handling of raw values, to support use cases where such values need to be passed through various conversions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions