FasterXML / jackson-dataformats-binary

Uber-project for standard Jackson binary format backends: avro, cbor, ion, protobuf, smile
Apache License 2.0
310 stars 133 forks source link

Enabling pretty-printing fails Ion serialization #247

Closed cowtowncoder closed 3 years ago

cowtowncoder commented 3 years ago

(note: cleaved off #245)

Enabling pretty-printing will make serialization fail with somewhat cryptic error message like:

    com.fasterxml.jackson.databind.JsonMappingException: Unexpected IOException (of type java.io.IOException): writeRaw() functionality not available with Ion backend

since default Jackson pretty-printing tries to use writeRaw() to add white-space indentation. But this will not work (see #245), so code in 2.12 should just ignore pretty-printing setting first, and then can tackle actual implementation for textual Ion for 2.13 or later.