lib/common/utils/dataschema-json.js
function(schema, json_in, data_out) {
        var getPath  = SchemaJSON.getPath,
            getValue = SchemaJSON.getLocationValue,
            path     = getPath(schema.resultListLocator),
            results  = path ?
                (getValue(path, json_in) ||
                    // Fall back to treat resultListLocator as a simple key
                json_in[schema.resultListLocator]) :
                // Or if no resultListLocator is supplied, use the input
                json_in;

        if (isArray(results)) {
            // if no result fields are passed in, then just take
            // the results array whole-hog Sometimes you're getting
            // an array of strings, or want the whole object, so
            // resultFields don't make sense.
            if (isArray(schema.resultFields)) {
                data_out = SchemaJSON._getFieldValues.call(this, schema.resultFields, results, data_out);
            } else {
                data_out.results = results;
            }
        } else if (!results) { //else if (schema.resultListLocator) {
            data_out.results = [];
            data_out.error = new Error("JSON results retrieval failure");
            //Y.log("JSON data could not be parsed: " + Y.dump(json_in), "error", "dataschema-json");
        }
        else {
            data_out.results = results;
        }

        return data_out;
    }
function(schema, json_in, data_out) {
        var getPath  = SchemaJSON.getPath,
            getValue = SchemaJSON.getLocationValue,
            path     = getPath(schema.resultListLocator),
            results  = path ?
                (getValue(path, json_in) ||
                    // Fall back to treat resultListLocator as a simple key
                json_in[schema.resultListLocator]) :
                // Or if no resultListLocator is supplied, use the input
                json_in;

        if (isArray(results)) {
            // if no result fields are passed in, then just take
            // the results array whole-hog Sometimes you're getting
            // an array of strings, or want the whole object, so
            // resultFields don't make sense.
            if (isArray(schema.resultFields)) {
                data_out = SchemaJSON._getFieldValues.call(this, schema.resultFields, results, data_out);
            } else {
                data_out.results = results;
            }
        } else if (!results) { //else if (schema.resultListLocator) {
            data_out.results = [];
            data_out.error = new Error("JSON results retrieval failure");
            //Y.log("JSON data could not be parsed: " + Y.dump(json_in), "error", "dataschema-json");
        }
        else {
            data_out.results = results;
        }

        return data_out;
    }
function ( schema , json_in , data_out ) { var getPath = SchemaJSON . getPath , getValue = SchemaJSON . getLocationValue , path = getPath ( schema . resultListLocator ) , results = path ? ( getValue ( path , json_in ) || // Fall back to treat resultListLocator as a simple key json_in [ schema . resultListLocator ] ) : // Or if no resultListLocator is supplied, use the input json_in ; if ( isArray ( results ) ) { // if no result fields are passed in, then just take // the results array whole-hog Sometimes you're getting // an array of strings, or want the whole object, so // resultFields don't make sense. if ( isArray ( schema . resultFields ) ) { data_out = SchemaJSON . _getFieldValues . call ( this , schema . resultFields , results , data_out ) ; } else { data_out . results = results ; } } else if ( ! results ) { //else if (schema.resultListLocator) { data_out . results = [ ] ; data_out . error = new Error ( "JSON results retrieval failure" ) ; //Y.log("JSON data could not be parsed: " + Y.dump(json_in), "error", "dataschema-json"); } else { data_out . results = results ; } return data_out ; }
Schema-parsed list of results from full data

@method _parseResults
@param schema {Object} Schema to parse against.
@param json_in {Object} JSON to parse.
@param data_out {Object} In-progress parsed data to update.
@return {Object} Parsed data object.
@static
@protected
Schema - parsed list of results from full data