-
Notifications
You must be signed in to change notification settings - Fork 3
JSTEP 8
(Back to JSTEP page)
Tatu Saloranta (@cowtowncoder)
- 2024-11-20: first version
Work-in-progress as of November 2024 (2.18.2)
As of Jackson 2.x, format-specific features have been typically added as inner-class Enums of format-specific parsers/generators: for example, Avro module (jackson-dataformat-avro) has:
-
AvroParser.Featurefor reader-side on/off features -
AvroGenerator.Featurefor writer-side on/off features
Not all formats have such features (and some only reader- or writer-side ones), but all follow the same pattern.
This was modeled based on original JsonParser.Feature (mix of JSON-specific and general features), JsonGenerator.Feature approach.
Jackson 2.10, however, split JsonParser.Feature into 2 sets of Features:
-
StreamReadFeaturefor general-purpose (cross-format, non-JSON-specific) features -
JsonReadFeaturefor JSON-specific features
While there is no confusion on format-specific/general features outside of JSON package, it seems ideal to follow same naming convention, so that:
-
AvroParser.FeaturebecomesAvroReadFeature -
AvroGenerator.FeaturebecomesAvroWriteFeature
Here are issues created for work on this JSTEP, by format module:
- Avro: dataformats-binary#522
- CBOR: dataformats-binary#524
- CSV: dataformats-text#510
- Ion: dataformats-binary#526
- Properties: No read/write features, nothing to do
- Protobuf: No read/write features, nothing to do
- Smile: dataformats-binary#528
- TOML: Already using "new style" read/write features, nothing to do
- XML: dataformat-xml#687
- YAML: