mishoo/UglifyJS2 — pull request #158 by RefinedSoftwareLLC (2013-03-22 23:36:00+00:00)
Title: /* added: */ UglifyJS.beautifyJSON(files, options) { return beautifiedString; };

// UglifyJS.beautifyJSON(files, options) { return beautifiedString; };
// files = a (single or array of) file names, JSON strings, or JSON Objects.
// options = UglifyJS minify options.
// returns a beautified string of the passed JSON information.
//
// NEW OPTIONS:
// fromObject:true allows passing a JSON object or an array of JSON objects.
// replacer:function(key, oldValue){ return newValue; }
// replacer:["Array", "of", "kept", "properties", "all", "others", "discarded"]
//
// UNSUPPORTED: (Source Maps):true, compress:true, quote_keys:false.
//
// WARNING: All input is run through JSON.stringify() which will change some invalid
// values (like NaN and infinity) and error on others (like incorrect syntax).