Create JsonReadFeature
to move JSON-specific JsonParser.Feature
s to
#467
Labels
3.x
Issues to be only tackled for Jackson 3.x, not 2.x
Currently
JsonParser
serves dual role of being both base parser/decoder API and its JSON-backed implementation. Ideally we would split it into 2 parts (similar to howJsonFactory
was changed to extendTokenStreamFactory
, new API, and become just implementation), but due to wide-spread usage in mapper api this is impractical.But one aspect we can improve is to split
JsonParser.Feature
entries: most of them are strictly JSON-specific, and only couple have general applicability.While we could half-ass this change, too, we probably need to do full change in 3 distinct parts:
JsonReadFeature
(for most entries). For 2.10, has to duplicate entries; for 3.x can actually move. 2.10 probably has to map these toJsonParser.Feature
StreamReadFeature
(for couple of general purpose ones). For 2.10, could simply map to existingJsonParser.Feature
s (implementation-wise); for 3.x, probably want to reverse.JsonParser.Feature
itself; entries to be deprecated (perhaps even in 2.10?).It also seems likely that although we can forward-proof API to a degree with 2.10, implementation probably differs so that:
JsonParser.Feature
shared flags (since they are more widely used), but can just drop JSON-specific ones as delegation might get tricky. This is backwards-incompatible but probably better than attempts at hybrid; most common case is probably that of comment-enabling.The text was updated successfully, but these errors were encountered: