build/breeze.debug.js
function JsonResultsAdapter(config) {
    if (arguments.length !== 1) {
      throw new Error("The JsonResultsAdapter ctor should be called with a single argument that is a configuration object.");
    }
    
    assertConfig(config)
        .whereParam("name").isNonEmptyString()
        .whereParam("extractResults").isFunction().isOptional().withDefault(extractResultsDefault)
        .whereParam("extractSaveResults").isFunction().isOptional().withDefault(extractSaveResultsDefault)
        .whereParam("extractKeyMappings").isFunction().isOptional().withDefault(extractKeyMappingsDefault)
        .whereParam("extractDeletedKeys").isFunction().isOptional().withDefault(extractDeletedKeysDefault)
        .whereParam("visitNode").isFunction()
        .applyAll(this);
    __config._storeObject(this, proto._$typeName, this.name);
  }
function JsonResultsAdapter(config) {
    if (arguments.length !== 1) {
      throw new Error("The JsonResultsAdapter ctor should be called with a single argument that is a configuration object.");
    }
    
    assertConfig(config)
        .whereParam("name").isNonEmptyString()
        .whereParam("extractResults").isFunction().isOptional().withDefault(extractResultsDefault)
        .whereParam("extractSaveResults").isFunction().isOptional().withDefault(extractSaveResultsDefault)
        .whereParam("extractKeyMappings").isFunction().isOptional().withDefault(extractKeyMappingsDefault)
        .whereParam("extractDeletedKeys").isFunction().isOptional().withDefault(extractDeletedKeysDefault)
        .whereParam("visitNode").isFunction()
        .applyAll(this);
    __config._storeObject(this, proto._$typeName, this.name);
  }
function JsonResultsAdapter ( config ) { if ( arguments . length !== 1 ) { throw new Error ( "The JsonResultsAdapter ctor should be called with a single argument that is a configuration object." ) ; } assertConfig ( config ) . whereParam ( "name" ) . isNonEmptyString ( ) . whereParam ( "extractResults" ) . isFunction ( ) . isOptional ( ) . withDefault ( extractResultsDefault ) . whereParam ( "extractSaveResults" ) . isFunction ( ) . isOptional ( ) . withDefault ( extractSaveResultsDefault ) . whereParam ( "extractKeyMappings" ) . isFunction ( ) . isOptional ( ) . withDefault ( extractKeyMappingsDefault ) . whereParam ( "extractDeletedKeys" ) . isFunction ( ) . isOptional ( ) . withDefault ( extractDeletedKeysDefault ) . whereParam ( "visitNode" ) . isFunction ( ) . applyAll ( this ) ; __config . _storeObject ( this , proto . _$typeName , this . name ) ; }
A JsonResultsAdapter instance is used to provide custom extraction and parsing logic on the json results returned by any web service.
This facility makes it possible for breeze to talk to virtually any web service and return objects that will be first class 'breeze' citizens.

@class JsonResultsAdapter
 
JsonResultsAdapter constructor

@example

var jsonResultsAdapter = new JsonResultsAdapter({
name: "test1e",
extractResults: function(json) {
return json.results;
},
visitNode: function(node, mappingContext, nodeContext) {
var entityType = normalizeTypeName(node.$type);
var propertyName = nodeContext.propertyName;
var ignore = propertyName && propertyName.substr(0, 1) === "$";

return {
entityType: entityType,
nodeId: node.$id,
nodeRefId: node.$ref,
ignore: ignore,
passThru: false // default
};
}
});

var dataService = new DataService( {
serviceName: "breeze/foo",
jsonResultsAdapter: jsonResultsAdapter
});

var entityManager = new EntityManager( {
dataService: dataService
});

@method <ctor> JsonResultsAdapter
@param config {Object}
@param config.name {String} The name of this adapter.  This name is used to uniquely identify and locate this instance when an 'exported' JsonResultsAdapter is later imported.
@param [config.extractResults] {Function} Called once per query operation to extract the 'payload' from any json received over the wire.
This method has a default implementation which to simply return the "results" property from any json returned as a result of executing the query.
@param [config.extractSaveResults] {Function} Called once per save operation to extract the entities from any json received over the wire.  Must return an array.
This method has a default implementation which to simply return the "entities" property from any json returned as a result of executing the save.
@param [config.extractKeyMappings] {Function} Called once per save operation to extract the key mappings from any json received over the wire.  Must return an array.
This method has a default implementation which to simply return the "keyMappings" property from any json returned as a result of executing the save.
@param config.visitNode {Function} A visitor method that will be called on each node of the returned payload.
A JsonResultsAdapter instance is used to provide custom extraction and parsing logic on the json results returned by any web service . This facility makes it possible for breeze to talk to virtually any web service and return objects that will be first class breeze citizens .