goog.ds.JsonDataSource
Classgoog.ds.JsonDataSource
> goog.ds.JsDataSource
> goog.ds.DataNode
goog.ds.JsonDataSource(uri, name, opt_callbackParamName)
Data source whose backing is a JSON-like service, in which retreiving the resource specified by URL with the additional parameter callback. The resource retreived is executable JavaScript that makes a call to the named function with a JavaScript object literal as the only parameter. Example URI could be: http://www.google.com/data/search?q=monkey&callback=mycb which might return the JS: mycb({searchresults: [{uri: 'http://www.monkey.com', title: 'Site About Monkeys'}]}); TODO(user): Evaluate using goog.net.Jsonp here. A URI of an empty string will mean that no request is made and the data source will be a data source with no child nodes
uri
{string
|goog.Uri
}
name
{string
}
opt_callbackParamName
{string
=}
.get(var_args)
Inherited from goog.ds.JsDataSource
.
Get the value of the node
var_args
{...?}
.getChildNode(name, opt_canCreate)
Inherited from goog.ds.JsDataSource
.
Gets a named child node of the current node
name
{string
}
opt_canCreate
{boolean
=}
goog.ds.DataNode
}
.getChildNodeValue(name)
Inherited from goog.ds.JsDataSource
.
Gets the value of a child node
name
{string
}
Object
}
.getChildNodes(opt_selector)
Inherited from goog.ds.JsDataSource
.
TODO(user) revisit lazy creation.
opt_selector
{string
=}
goog.ds.DataNodeList
}
.getDataName()
Inherited from goog.ds.JsDataSource
.
Get the name of the node relative to the parent node
string
}
.getDataPath()
Inherited from goog.ds.JsDataSource
.
Gets the a qualified data path to this node
string
}
.getLoadState()
Gets the state of the backing data for this node
goog.ds.LoadState
}
.isList()
Inherited from goog.ds.JsDataSource
.
Whether the value of this node is a homogeneous list of data
boolean
}
.load()
Load or reload the backing data for this node. Fires the JsonDataSource
.receiveData(obj)
Receives data from a Json request
obj
{Object
}
.root_
[protected] {*}Inherited from goog.ds.JsDataSource
.
The root JS object. Can be null.
.set(value)
Inherited from goog.ds.JsDataSource
.
Set the value of the node
value
{*}
.setChildNode(name, value)
Inherited from goog.ds.JsDataSource
.
Sets a named child node of the current node. If value is null, removes the child node.
name
{string
}
value
{Object
}
Object
}
.setDataName(dataName)
Inherited from goog.ds.JsDataSource
.
Setthe name of the node relative to the parent node
dataName
{string
}
.setRoot(root)
[protected]Inherited from goog.ds.JsDataSource
.
Sets the root JS object
root
{Object
}