JSONReference.js
/**
     * While processing data, the script add two properies to all objects
     * object.__JSONReference__hash
     * object.__JSONReference__process
     *
     * Cleanup data remove both helper properties in all objects
     * 
     * @param mixed data
     * @param object objects
     */
While processing data, the script add two properies to all objects
object.__JSONReference__hash
object.__JSONReference__process

Cleanup data remove both helper properties in all objects

@param mixed data
@param object objects
While processing data the script add two properies to all objects object . __JSONReference__hash object . __JSONReference__process Cleanup data remove both helper properties in all objects @param mixed data @param object objects
function cleanupData(data, objects) {
        var property;
        if (typeof objects === 'undefined') {
            objects = {};
        }
        if (typeof data !== 'object' || data === null) {
            return;
        }
        if (typeof data === 'object' && data !== null) {
            if ('__JSONReference__hash' in data && data.__JSONReference__hash) {
                if (data.__JSONReference__hash in objects && objects[data.__JSONReference__hash] === true) {
                    return;
                }
                objects[data.__JSONReference__hash] = true;
            }
            for (property in data) {
                if (data.hasOwnProperty(property) === false) {
                    continue;
                }
                if (property === '__JSONReference__hash') {
                    continue;
                }
                if (property === '__JSONReference__process') {
                    continue;
                }
                cleanup_data(data[property], objects);
            }
            if ('__JSONReference__hash' in data) {
                delete data.__JSONReference__hash;
            }
            if ('__JSONReference__process' in data) {
                delete data.__JSONReference__process;
            }
        }
    }
function cleanupData ( data , objects ) { var property ; if ( typeof objects === 'undefined' ) { objects = { } ; } if ( typeof data !== 'object' || data === null ) { return ; } if ( typeof data === 'object' && data !== null ) { if ( '__JSONReference__hash' in data && data . __JSONReference__hash ) { if ( data . __JSONReference__hash in objects && objects [ data . __JSONReference__hash ] === true ) { return ; } objects [ data . __JSONReference__hash ] = true ; } for ( property in data ) { if ( data . hasOwnProperty ( property ) === false ) { continue ; } if ( property === '__JSONReference__hash' ) { continue ; } if ( property === '__JSONReference__process' ) { continue ; } cleanup_data ( data [ property ] , objects ) ; } if ( '__JSONReference__hash' in data ) { delete data . __JSONReference__hash ; } if ( '__JSONReference__process' in data ) { delete data . __JSONReference__process ; } } }
While processing data, the script add two properies to all objects
 object.__JSONReference__hash
 object.__JSONReference__process
While processing data the script add two properies to all objects object . __JSONReference__hash object . __JSONReference__process