Are there AS3 libraries for reading streams that parse libraries for json or xml formats? I am setting up a long polling application using URLStream / URLRequest. I have no control over the data that I receive, except for the choice between formats. I would like to have a parser that can process fragments at a time, which will allow me to fire custom events when certain full fragments become available. Thoughts? What are current AIR applications to handle this?
API Example:
var decoder:StreamingJSONDecoder = new StreamingJSONDecoder();
decoder.attachEvent("onobjectavailable", read_object);
while (urlStream.bytesAvailable)
{
decoder.readBytes(get_bytes(urlStream));
}
Kurtiss hare
source
share