Package fmpp.dataloaders
Class JSONDataLoader
java.lang.Object
fmpp.dataloaders.FileDataLoader
fmpp.dataloaders.JSONDataLoader
- All Implemented Interfaces:
DataLoader
Creates a
JSONNode
based on a JSON file. The JSON file must contain a single JSON value on the top level,
such as JSON object (like { "a": 1, "b": 2 }
), an array, or even just a string, number, boolean or
null
.-
Field Summary
Fields inherited from class fmpp.dataloaders.FileDataLoader
args, dataFile, engine
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
finalizeResult
(Object jsonPOJO) Converts the POJO created from the JSON to its final form.protected Object
load
(InputStream in) FileDataLoader
subclasess override this method to parse the file.Methods inherited from class fmpp.dataloaders.FileDataLoader
load
-
Constructor Details
-
JSONDataLoader
public JSONDataLoader()
-
-
Method Details
-
load
Description copied from class:FileDataLoader
FileDataLoader
subclasess override this method to parse the file.- Specified by:
load
in classFileDataLoader
- Throws:
Exception
-
finalizeResult
Converts the POJO created from the JSON to its final form.- Throws:
Exception
-