Skip to content

(2.8) Consider addition of JsonGenerator.writeEmbeddedObject(Object) #243

@cowtowncoder

Description

@cowtowncoder

(note: follow-up from FasterXML/jackson-databind#1068)

While VALUE_EMBEDDED_OBJECT is mostly used internally for piping through things like native binary content (byte[]), it is also necessary in some cases to support native datatypes of non-JSON formats, and especially when buffering is required. Although not all backends will support such writes (in fact, most standard ones would throw an exception), there are cases where calling code knows that this is safe usage; and there is the specific case of buffering (TokenBuffer) where we can support opaque passing of such objects.

So, it may make sense to add such an optional method to make it easier to support data formats with richer set of primitives.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions