core/Repository.js
function writeObject(elem) {
        var writer = new Core.Writer();
        elem.save(writer);
        var data = JSON.stringify(writer.current, null, "\t");
        return data;
    }
function writeObject(elem) {
        var writer = new Core.Writer();
        elem.save(writer);
        var data = JSON.stringify(writer.current, null, "\t");
        return data;
    }
function writeObject ( elem ) { var writer = new Core . Writer ( ) ; elem . save ( writer ) ; var data = JSON . stringify ( writer . current , null , "\t" ) ; return data ; }
Encode a given element to JSON data.
@private
@param {Core.Element} elem Element to be encoded
@return {string} JSON-encoded data.
Encode a given element to JSON data .