Make JsonGenerator.writeXxx()
methods chainable
#785
Labels
3.x
Issues to be only tackled for Jackson 3.x, not 2.x
JsonGenerator.writeXxx()
methods chainable
#785
Currently Jackson 2.x has
void
as return type for write methods, like:which prevents chaining of write calls. It would be nice to instead have these return
JsonGenerator
, but change of return type is bytecode-/binary-incompatible change and as such absolutely no-go for 2.x.But for 3.x this would be doable. It
One possible open question here is that format-specific subtypes' overriding of write methods; should they change return type to proper "this" type? I don't want to make
JsonGenerator
(... misnomer at this point, but it is what it is) type-parameterized.I guess this is not a problem for most usage but should probably decide on recommended approach.
The text was updated successfully, but these errors were encountered: