lib/collection/collection.js
function () {
        var json = ItemGroup.prototype.toJSON.apply(this);

        // move ids and stuff from root level to `info` object
        json.info = {
            _postman_id: this.id,
            name: this.name,
            version: this.version,
            schema: SCHEMA_URL
        };

        delete json.id;
        delete json.name;
        delete json.version;

        if (json.hasOwnProperty('description')) {
            json.info.description = this.description;
            delete json.description;
        }

        return json;
    }
function () {
        var json = ItemGroup.prototype.toJSON.apply(this);

        // move ids and stuff from root level to `info` object
        json.info = {
            _postman_id: this.id,
            name: this.name,
            version: this.version,
            schema: SCHEMA_URL
        };

        delete json.id;
        delete json.name;
        delete json.version;

        if (json.hasOwnProperty('description')) {
            json.info.description = this.description;
            delete json.description;
        }

        return json;
    }
function ( ) { var json = ItemGroup . prototype . toJSON . apply ( this ) ; // move ids and stuff from root level to `info` object json . info = { _postman_id : this . id , name : this . name , version : this . version , schema : SCHEMA_URL } ; delete json . id ; delete json . name ; delete json . version ; if ( json . hasOwnProperty ( 'description' ) ) { json . info . description = this . description ; delete json . description ; } return json ; }
Convert the collection to JSON compatible plain object

@returns {Object}
Convert the collection to JSON compatible plain object