-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
It turns out that buffering of token streams cannot always be done without some format-specific additions. For example:
- XML module may need to retain information on "attribute-ness", namespace(s); possible "unwrapped"
Collectiontypes - Ion and Avro probably have additional concepts that may need to retain
But currently databind will explicitly construct format-agnostic TokenBuffer, which can support some aspects (native type, object ids) but with added overhead and complexity.
It should be relatively easy, however, to (eventually?) allow format modules to override this selection: the way to do that would be to first make allocations of buffer instances go through:
DeserializationContext(for deserialization)SerializerProvider(for serialization)
and then format module may override one or both as necessary (XML module already overrides both, for example); or, if this becomes more widely necessary, context objects can offer other means of pluggability.
Either way, the first step is to add this one redirection.