Class Guacamole.JSONReader
Defined in: JSONReader.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Guacamole.JSONReader(stream)
A reader which automatically handles the given input stream, assembling all
received blobs into a JavaScript object by appending them to each other, in
order, and decoding the result as JSON.
|
Method Attributes | Method Name and Description |
---|---|
getJSON()
Returns the contents of this Guacamole.JSONReader as a JavaScript
object.
|
|
Returns the current length of this Guacamole.JSONReader, in characters.
|
Event Attributes | Event Name and Description |
---|---|
onend()
Fired once this stream is finished and no further data will be written.
|
|
onprogress(length)
Fired once for every blob of data received.
|
Class Detail
Guacamole.JSONReader(stream)
A reader which automatically handles the given input stream, assembling all
received blobs into a JavaScript object by appending them to each other, in
order, and decoding the result as JSON. Note that this object will overwrite
any installed event handlers on the given Guacamole.InputStream.
- Parameters:
- {Guacamole.InputStream} stream
- The stream that JSON will be read from.
Method Detail
{Object}
getJSON()
Returns the contents of this Guacamole.JSONReader as a JavaScript
object.
- Returns:
- {Object} The contents of this Guacamole.JSONReader, as parsed from the JSON contents of the input stream.
{Number}
getLength()
Returns the current length of this Guacamole.JSONReader, in characters.
- Returns:
- {Number} The current length of this Guacamole.JSONReader.
Event Detail
onend()
Fired once this stream is finished and no further data will be written.
onprogress(length)
Fired once for every blob of data received.
- Parameters:
- {Number} length
- The number of characters received.