-
-
Notifications
You must be signed in to change notification settings - Fork 819
Closed
Labels
3.xIssues to be only tackled for Jackson 3.x, not 2.xIssues to be only tackled for Jackson 3.x, not 2.x
Description
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 how JsonFactory
was changed to extend TokenStreamFactory
, 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:
- New JSON-specific feature, like
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
- New general-purpose feature, maybe
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:
- 2.10 will map new features into old flags, and basically not add much internally aside from delegation
- 3.0 should map deprecated
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.
Metadata
Metadata
Assignees
Labels
3.xIssues to be only tackled for Jackson 3.x, not 2.xIssues to be only tackled for Jackson 3.x, not 2.x