new 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:
Name | Type | Description |
---|---|---|
stream |
Guacamole.InputStream | The stream that JSON will be read from. |
- Source:
Methods
getJSON() → {object}
Returns the contents of this Guacamole.JSONReader as a JavaScript
object.
- Source:
Returns:
The contents of this Guacamole.JSONReader, as parsed from the JSON
contents of the input stream.
- Type
- object
getLength() → (non-null) {number}
Returns the current length of this Guacamole.JSONReader, in characters.
- Source:
Returns:
The current length of this Guacamole.JSONReader.
- Type
- number
Events
onend
Fired once this stream is finished and no further data will be written.
onprogress
Fired once for every blob of data received.
Parameters:
Name | Type | Description |
---|---|---|
length |
number | The number of characters received. |