_getFieldValues
protected
static
Object
_getFieldValues
(
fields
,
array_in
,
data_out
)
Get field data values out of list of full results
- Parameters:
-
fields <Array>
Fields to find. -
array_in <Array>
Results to parse. -
data_out <Object>
In-progress parsed data to update.
- Returns:
Object
- Parsed data object.
_parseMeta
protected
static
Object
_parseMeta
(
metaFields
,
json_in
,
data_out
)
Parses results data according to schema
- Parameters:
-
metaFields <Object>
Metafields definitions. -
json_in <Object>
JSON to parse. -
data_out <Object>
In-progress parsed data to update.
- Returns:
Object
- Schema-parsed meta data.
_parseResults
protected
static
Object
_parseResults
(
schema
,
json_in
,
data_out
)
Schema-parsed list of results from full data
- Parameters:
-
schema <Object>
Schema to parse against. -
json_in <Object>
JSON to parse. -
data_out <Object>
In-progress parsed data to update.
- Returns:
Object
- Parsed data object.
apply
static
Object
apply
(
schema
,
data
)
Applies a given schema to given JSON data.
- Parameters:
-
schema <Object>
Schema to apply. -
data <Object>
JSON data.
- Returns:
Object
- Schema-parsed data.
DataSchema.JSON.getLocationValue
static
Object
DataSchema.JSON.getLocationValue
(
path
,
data
)
Utility function to walk a path and return the value located there.
- Parameters:
-
path <String[]>
Locator path. -
data <String>
Data to traverse.
- Returns:
Object
- Data value at location.
DataSchema.JSON.getPath
static
String[]
DataSchema.JSON.getPath
(
locator
)
Utility function converts JSON locator strings into walkable paths
- Parameters:
-
locator <String>
JSON value locator.
- Returns:
String[]
- Walkable path to data value.