-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
(NOTE: part of bigger set of changes, see https://github.com/FasterXML/jackson-future-ideas/wiki/JSTEP-4)
Although choice of JsonProcessingException
to extend IOException
made sense originally (I think), later developments -- in particular, Java 8 Streams and functional approach in general -- have made use of checked exceptions cumbersome for many use cases.
But due to backwards compatibility concerns, change of base exception type has not been possible within 2.x releases.
Now that we are working on 3.0, however, we can make this change. Compared to alternative of providing alternate subtypes of ObjectMapper
, ObjectReader
and/or ObjectWriter
(ones that do not declare checked exceptions for methods), this leads to simpler API.
For 2.x we may still consider simpler work-arounds (maybe convenience wrappers), but with 3.0 let's rebase.
Note, too, that this will help use of Jackson for some specific cases like serialization of this
from toString()
(and with #2176).