src/pyjamas.js
/**
     * Encodes the given target into a raw object that conforms to JavaScript
     * Object Notation. The resulting object will not have any undefined or
     * function references.
     *
     * @param target {object} Target to encode
     *
     * @return {object} Encoded object
     * @private
     */
Encodes the given target into a raw object that conforms to JavaScript
Object Notation. The resulting object will not have any undefined or
function references.

@param target {object} Target to encode

@return {object} Encoded object
@private
Encodes the given target into a raw object that conforms to JavaScript Object Notation . The resulting object will not have any undefined or function references . @param target { object } Target to encode @return { object } Encoded object @private
function encode (target) {
        var parent = {},
            pjs = PyjamasDB.fetch(getConstructor(target));
        if (pjs) {
            if (pjs.parent) {
                parent = encode(merge(clone(target), {constructor : pjs.parent}));
            }
            return merge(parent, encodeEach(pjs.defines, target, pjs.version));
        }
        return target instanceof Object ? encodeEach(target, target) : target;
    }
function encode ( target ) { var parent = { } , pjs = PyjamasDB . fetch ( getConstructor ( target ) ) ; if ( pjs ) { if ( pjs . parent ) { parent = encode ( merge ( clone ( target ) , { constructor : pjs . parent } ) ) ; } return merge ( parent , encodeEach ( pjs . defines , target , pjs . version ) ) ; } return target instanceof Object ? encodeEach ( target , target ) : target ; }
Encodes the given target into a raw object that conforms to JavaScript
 Object Notation.
Encodes the given target into a raw object that conforms to JavaScript Object Notation .