Hi Jitu,
thanks for your comments.
I'm using 1.0.4-SNAPSHOT but I have to pull latest changes.
In (not only) my opinion JsonWriter should be extending also Flushable
interface (in addition to (Auto)Closable). This is the cleanest and most
obvious solution - workarounds proposed are ugly and should not apply for
this newly developed JSONP API. I know that this is a modification of a
public API but I'm not sure this API is already approved or it's still
under development. Even if it's approved it could be a patch or (1.0.1
release :)
Please note that all the other solution proposed either by me or you are
implementation dependent. This small change in API makes it flexible and
available for all possible implementations.
I will open a JIRA issue beg next week.
Have a nice weekend!
Przemyslaw