Detailed Description
JSON implementation of IDataLoader.
This deserialises the data from a JSON file to the type T.
- Parameters
-
<T> type of object to load
Inheritance diagram for fiftyone.pipeline.engines.data.JsonLoader< T >:
Collaboration diagram for fiftyone.pipeline.engines.data.JsonLoader< T >:
Public Member Functions | |
| T | loadData (String filePath, Class< T > type) throws IOException, IllegalAccessException, InvocationTargetException, InstantiationException |
| Load a new instance of T using the data in the file provided. | |
| T | loadData (byte[] data, Class< T > type) throws IOException, IllegalAccessException, InvocationTargetException, InstantiationException |
| Load a new instance of T using the data in the byte array provided. | |
Member Function Documentation
◆ loadData() [1/2]
| T fiftyone.pipeline.engines.data.JsonLoader< T >.loadData | ( | byte[] | data, |
| Class< T > | type ) throws IOException, IllegalAccessException, InvocationTargetException, InstantiationException |
Load a new instance of T using the data in the byte array provided.
- Parameters
-
data byte array to load from type the type of object to load
- Returns
- new instance of T
- Exceptions
-
IOException if there was a problem reading or writing IllegalAccessException if there was a problem accessing memory InvocationTargetException if there was a reflection based problem in the implementation InstantiationException if an instance of T could not be created
Implements fiftyone.pipeline.engines.data.DataLoader< T >.
◆ loadData() [2/2]
| T fiftyone.pipeline.engines.data.JsonLoader< T >.loadData | ( | String | filePath, |
| Class< T > | type ) throws IOException, IllegalAccessException, InvocationTargetException, InstantiationException |
Load a new instance of T using the data in the file provided.
- Parameters
-
filePath file to load from type the type of object to load
- Returns
- new instance of T
- Exceptions
-
IOException if there was a problem reading or writing IllegalAccessException if there was a problem accessing memory InvocationTargetException if there was a reflection based problem in the implementation InstantiationException if an instance of T could not be created
Implements fiftyone.pipeline.engines.data.DataLoader< T >.
