examples/HTML StarterKit/lib/durandal/js/plugins/serializer.js
function(text, settings) {
            var that = this;
            settings = settings || {};

            var getTypeId = settings.getTypeId || function(object) { return that.getTypeId(object); };
            var getConstructor = settings.getConstructor || function(id) { return that.typeMap[id]; };
            var reviver = settings.reviver || function(key, value) { return that.reviver(key, value, getTypeId, getConstructor); };

            return JSON.parse(text, reviver);
        }
function(text, settings) {
            var that = this;
            settings = settings || {};

            var getTypeId = settings.getTypeId || function(object) { return that.getTypeId(object); };
            var getConstructor = settings.getConstructor || function(id) { return that.typeMap[id]; };
            var reviver = settings.reviver || function(key, value) { return that.reviver(key, value, getTypeId, getConstructor); };

            return JSON.parse(text, reviver);
        }
function ( text , settings ) { var that = this ; settings = settings || { } ; var getTypeId = settings . getTypeId || function ( object ) { return that . getTypeId ( object ) ; } ; var getConstructor = settings . getConstructor || function ( id ) { return that . typeMap [ id ] ; } ; var reviver = settings . reviver || function ( key , value ) { return that . reviver ( key , value , getTypeId , getConstructor ) ; } ; return JSON . parse ( text , reviver ) ; }
Deserialize the JSON.
@method deserialize
@param {string} text The JSON string.
@param {object} [settings] Settings can specify a reviver, getTypeId function or getConstructor function.
@return {object} The deserialized object.
Deserialize the JSON .