turicreate.SArray.read_json

classmethod SArray.read_json(filename)

Construct an SArray from a json file or glob of json files. The json file must contain a list. Every element in the list must also have the same type. The returned SArray type will be inferred from the elements type.

Parameters:
filename : str

The filename or glob to load into an SArray.

Examples

Construct an SArray from a local JSON file named ‘data.json’:

>>> turicreate.SArray.read_json('/data/data.json')

Construct an SArray from all JSON files /data/data*.json

>>> turicreate.SArray.read_json('/data/data*.json')