Hi Jitu,The equivalent XMLStreamWriter is JsonGenerator in the API. It implements Flushable interface.
Please, take into consideration that people who work with XML today may
consider migrating to Json. For that, they need an API that is rich enough to
deal with the problems they have. Therefore, they will probably miss the
flush() method because you can find this method in the XML Stream API
There are algorithms out there that need it.
Even Json for .net has it
so you can not neglect it, because it just have to be there, period.
I’m sure you can find it in many other APIs, so Jsonp cannot fall behind for
On 01 Nov 2013, at 00:36, Jitendra Kotamraju
On 10/31/13 12:17 PM, Jitendra Kotamraju wrote:
That should have worked esp when you are creating JsonWriter using a i/oI fixed this for byte streams also. So, JsonWriter#write methods would write
Writer. JsonWriter.write() method writes all the contents to underlying
writer. The recent releases don't use BufferedWriter. Are you using the
latest version i.e. 1.3 or 1.4-SNAPSHOT ?
But if you create JsonWriter with byte stream, then that doesn't work.
Internally, it uses
all the buffered contents to given output source.
Re: JsonWriter is missing flush() method