One of remaining "big ticket items" I still hope to implement for
Jackson 2.9 is so-called "safe" ObjectReader and ObjectWriter. This
means reader/writer that only exposes unchecked exceptions; by
necessity wrapping (or perhaps converting) regular `IOException`s and
`JsonProcessingException`, `JsonMappingException`.

Originally I thought to wrap `ObjectMapper` this way, but there are a
few problems with this, not least that many dataformats sub-class
mapper class.
However, ObjectWriter and ObjectReader are NOT sub-classed (or
-classable really) by modules.
Further, sub-classing and method overriding DOES allow removal of
exception declaration so there is no need for refactoring new
interfaces.

Original issue is at:

https://github.com/FasterXML/jackson-databind/issues/779

Specific use case that triggered this is that for some of newer
functional interfaces, and most notable Java 8 Streaming API, exposing
checked Exceptions is tricky or impossible; and having API that
exposes none is beneficial.

With this, I have one question: how to name these?

Two current options are "checked" and "safe" -- so, for
`ObjectReader`, we could have:

1. UncheckedReader (or UncheckedObjectReader) -- and method
`unchecked()` / `uncheckedReader()` to get instance from regular one
2. SafeReader (or SafeObjectReader) -- and method `safe()` or
`safeReader()` for creating instance.

In some ways I like "safe" better, but not strongly. But more
importantly perhaps I am ignoring some much more intuitive naming
here.
Either way, if you have opinion, let me know what you think.

-+ Tatu +-

-- 
You received this message because you are subscribed to the Google Groups 
"jackson-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to