jsonminify
Version:
JSON.minify() minifies blocks of JSON-like content into valid JSON by removing all whitespace *and* comments.
47 lines (46 loc) • 1.35 kB
JSON
/**
* spam
*/
// spam
[ // foo
{ // hoge
"fo\\\\o": "ba\"r",// this is cool
"ba\\r": [
"baz", "b\"\"u\"m", /** aaaa **/"zam" // this is cool
],
/* the rest of this document is just fluff
in case you are interested. */
"somethi\"\"ng": [10,11,12, /*aaa */23], // a
/** the rest of this document is just fluff
*in case you are interested. */
"else": 20
}, // hoge
{ // hoge
"fo\\\\o": "ba\"r",// this is cool
"ba\\r": [
"baz", "b\"\"u\"m", /** aaaa **/"zam" // this is cool
],
/* the rest of this document is just fluff
in case you are interested. */
"somethi\"\"ng": [10,11,12, /*aaa */23], // a
/** the rest of this document is just fluff
*in case you are interested. */
"else": 20
}, // hoge
{ // hoge
"fo\\\\o": "ba\"r",// this is cool
"ba\\r": [
"baz", "b\"\"u\"m", /** aaaa **/"zam" // this is cool
],
/* the rest of this document is just fluff
in case you are interested. */
"somethi\"\"ng": [10,11,12, /*aaa */23], // a
/** the rest of this document is just fluff
*in case you are interested. */
"else": 20
} // hoge
] // foo
/**
* spam
*/
// spam