Skip to content

Add general JsonGenerator.Feature, IGNORE_UNKNOWN #164

@cowtowncoder

Description

@cowtowncoder

Since there are binary data formats that require use of schema to indicate possible property names, there are cases where higher-level code may try to write "unknown properties". While this is often a problem that should be fixed by avoiding trying to write such values, there are cases where it would be better to be able to simply quietly suppress such attempts, and "write what you can".

One example of such format is Avro, and Avro module has a feature to do what suggested above.
However other formats like csv and protobuf would also benefit from same handling.
So even though this feature would not be applicable for all formats, it would make sense to have a feature that is ignored by formats where it makes no sense; and use where it does.
This, then, means that core module mainly just defines the feature, but it is up to individual format modules to make use of it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions