dist/ObjectMapper.js
function (instance, instanceKey, type, json, jsonKey) {
    var jsonObject = (jsonKey !== undefined) ? (json[jsonKey] || []) : json;
    var jsonArraySize = jsonObject.length;
    var conversionFunctionsList = [];
    var arrayInstance = [];
    instance[instanceKey] = arrayInstance;
    if (jsonArraySize > 0) {
        for (var i = 0; i < jsonArraySize; i++) {
            if (jsonObject[i]) {
                var typeName = getTypeNameFromInstance(type);
                if (!isSimpleType(typeName)) {
                    var typeInstance = new type();
                    conversionFunctionsList.push({ functionName: Constants.OBJECT_TYPE, instance: typeInstance, json: jsonObject[i] });
                    arrayInstance.push(typeInstance);
                }
                else {
                    arrayInstance.push(conversionFunctions[Constants.FROM_ARRAY](jsonObject[i], typeName));
                }
            }
        }
    }
    return conversionFunctionsList;
}
function (instance, instanceKey, type, json, jsonKey) {
    var jsonObject = (jsonKey !== undefined) ? (json[jsonKey] || []) : json;
    var jsonArraySize = jsonObject.length;
    var conversionFunctionsList = [];
    var arrayInstance = [];
    instance[instanceKey] = arrayInstance;
    if (jsonArraySize > 0) {
        for (var i = 0; i < jsonArraySize; i++) {
            if (jsonObject[i]) {
                var typeName = getTypeNameFromInstance(type);
                if (!isSimpleType(typeName)) {
                    var typeInstance = new type();
                    conversionFunctionsList.push({ functionName: Constants.OBJECT_TYPE, instance: typeInstance, json: jsonObject[i] });
                    arrayInstance.push(typeInstance);
                }
                else {
                    arrayInstance.push(conversionFunctions[Constants.FROM_ARRAY](jsonObject[i], typeName));
                }
            }
        }
    }
    return conversionFunctionsList;
}
function ( instance , instanceKey , type , json , jsonKey ) { var jsonObject = ( jsonKey !== undefined ) ? ( json [ jsonKey ] || [ ] ) : json ; var jsonArraySize = jsonObject . length ; var conversionFunctionsList = [ ] ; var arrayInstance = [ ] ; instance [ instanceKey ] = arrayInstance ; if ( jsonArraySize > 0 ) { for ( var i = 0 ; i < jsonArraySize ; i ++ ) { if ( jsonObject [ i ] ) { var typeName = getTypeNameFromInstance ( type ) ; if ( ! isSimpleType ( typeName ) ) { var typeInstance = new type ( ) ; conversionFunctionsList . push ( { functionName : Constants . OBJECT_TYPE , instance : typeInstance , json : jsonObject [ i ] } ) ; arrayInstance . push ( typeInstance ) ; } else { arrayInstance . push ( conversionFunctions [ Constants . FROM_ARRAY ] ( jsonObject [ i ] , typeName ) ) ; } } } } return conversionFunctionsList ; }
Deserializes a JS array type from json.
Deserializes a JS array type from json .