Are there any stream-reading, parsing libraries available for json or xml formats in AS3? I'm setting up a long-polling application, using URLStream/URLRequest. I do not have control over the data I'm receiving other than a choice between formats. I'd like to have a parser that can handle fragments at a time, which would allow me to trigger custom events when certain complete fragments become available. Thoughts? What are current AIR applications doing to handle this?
Sample API:
var decoder:StreamingJSONDecoder = new StreamingJSONDecoder();
decoder.attachEvent("onobjectavailable", read_object);
while (urlStream.bytesAvailable)
{
decoder.readBytes(get_bytes(urlStream));
}