Open avsej opened 11 years ago
It should be possible to create instance of the Gson::Decoder and feed the chunks of JSON and it should execute callbacks when the object is ready.
Gson::Decoder
decoder = Gson::Decoder.new decoder.on_document do |doc| puts doc.inspect end decoder.write('{"foo') decoder.write('":"bar"},{"num":') #=> {"foo" => "bar"} decoder.write('1}') #=> {"num" => 1}
It should be possible to create instance of the
Gson::Decoder
and feed the chunks of JSON and it should execute callbacks when the object is ready.