On Wed, Apr 25, 2018 at 11:54 PM,  <[email protected]> wrote:
>
> On Wednesday, April 25, 2018 at 11:52:17 PM UTC-7, Tatu Saloranta wrote:
>>
>> Ah. Any method starting with underscore is considered more or less
>> implementation-specific.
>> So you would need to sort of follow control flow from public methods.
>> Your suggestion sounds reasonable, assuming you know the type of
>> pretty printer in question
>> is DefaultPrettyPrinter.
>>
>> -+ Tatu +-
>
>
> Yeah, I didn't really want to have to do it this way, because it looked like
> a lot of secret internal code, but it was the only proven way to wedge some
> properly formatted JSON into the middle of Jersey 2, Grizzly, etc. You don't
> want to know how much code I was reading to get this to work initially... ;)
>
> Matthew.

:)

Amen to that.

Approach taken by Jackson wrt `PrettyPrinter` is not the cleanest
either, and was retrofit to deal with
(in hindsight obvious) concurrency issues. So I don't blame you for
finding it non-intuitive.

But all's well that ends well -- yes, it is necessary to call
`createInstance` if using alternate entry points
when creating/using generators. Let me know if you have further issues
with this approach.

-+ Tatu +-

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

Reply via email to