Language
Edit

DataSourceGOJson Class

Definition

A data source MonoBehaviour that manages a structured data set that was provided by a JSON text stream.

The JSON provided to this call will typically be the result of a RESTful call to a back-end service. That JSON can be provided directly to this data source and will trigger changes to any data consumers listening for data changes to this source.

TODO: Compare deltas between JSON fetches to reduce the number of data consumer notifications to only this keypaths that have actually changed since the last data fetch.

[UnityEngine.AddComponentMenu("MRTK/Data Binding/Sources/Data Source JSON")]
public class DataSourceGOJson : MixedReality.Toolkit.Data.DataSourceGOBase
[<UnityEngine.AddComponentMenu("MRTK/Data Binding/Sources/Data Source JSON")>]
type DataSourceGOJson = class
    inherit DataSourceGOBase
Public Class DataSourceGOJson
Inherits DataSourceGOBase
Inheritance
UnityEngine.MonoBehaviour
DataSourceGOJson
Attributes
UnityEngine.AddComponentMenuAttribute

Constructors

Name Description
DataSourceGOJson()

Fields

Name Description
_callbackRegex
dataSourceType (Inherited from DataSourceGOBase)
keyPathMapper (Inherited from DataSourceGOBase)

Properties

Name Description
DataController

An optional data controller.

(Inherited from DataSourceGOBase)
DataSource (Inherited from DataSourceGOBase)
DataSourceJson
DataSourceType

Get the data source type

(Inherited from DataSourceGOBase)

Methods

Name Description
AddDataConsumerListener(String, IDataConsumer)

Add a new data consumer listener for the specified key path

(Inherited from DataSourceGOBase)
AllocateDataSource()

Allocate the correct data source

DataChangeSetBegin()

Begin a data change set.

(Inherited from DataSourceGOBase)
DataChangeSetEnd()

End a data change set.

(Inherited from DataSourceGOBase)
GetCollectionCount(String)

If a key path represents a collection, return the number of items in that collection.

(Inherited from DataSourceGOBase)
GetCollectionKeyPathRange(String, Int32, Int32)

Get an enumerable collection of key path strings for the specified collection index range.

(Inherited from DataSourceGOBase)
GetDataSource(String)

IDataSourceProvider method to get this data source.

(Inherited from DataSourceGOBase)
GetDataSourceTypes()

Get an array of data source types that can be provided by this provider

(Inherited from DataSourceGOBase)
GetNthCollectionKeyPathAt(String, Int32)

If a key path represents a collection, return a collection key path for the entry at index n.

(Inherited from DataSourceGOBase)
GetValue(String)

Get the value associated with the specified key path and prefix

(Inherited from DataSourceGOBase)
InitializeDataSource() (Inherited from DataSourceGOBase)
IsCollectionAtKeyPath(String)

Determine if key path represents a data collection

(Inherited from DataSourceGOBase)
IsDataAvailable()

Is data available in the data source.

(Inherited from DataSourceGOBase)
NotifyAllChanged(DataChangeType, IDataConsumer)

Notify all listeners that data has changed.

(Inherited from DataSourceGOBase)
NotifyDataChanged(String, Object, DataChangeType, Boolean)

Inform data source that its data has changed.

(Inherited from DataSourceGOBase)
RemoveDataConsumerListener(String, IDataConsumer)

Remove a data consumer listener for the specified key path

(Inherited from DataSourceGOBase)
ResolveKeyPath(String, String)

Resolve a key path using a given prefix and local path.

(Inherited from DataSourceGOBase)
SetDataKeyPathMapper(IDataKeyPathMapper)

Set a key path mapper.

(Inherited from DataSourceGOBase)
SetJson(String)

Set the text that will be parsed and used to build the memory based DOM.

SetValue(String, Object, Boolean)

Set the value associated with the specified key path

(Inherited from DataSourceGOBase)
StartJsonRequest(String, DataSourceGOJson+RequestSuccessDelegate, DataSourceGOJson+RequestFailureDelegate, Object)

Applies to