diff options
| author | Ben Beltran <ben@nsovocal.com> | 2017-03-02 13:13:31 -0600 |
|---|---|---|
| committer | Ben Beltran <ben@nsovocal.com> | 2017-03-02 13:13:31 -0600 |
| commit | 06a3d6866e4f545abddd6654e490e50b623330a9 (patch) | |
| tree | e0e6a7d72eeaf647d03a44ed5c12733796fb8b87 /atom/packages/pretty-json/node_modules/jsonminify/test.minify.html | |
| parent | 49c52987b6c6be6392351b6a7b227efc7341a414 (diff) | |
Update atoms
Diffstat (limited to 'atom/packages/pretty-json/node_modules/jsonminify/test.minify.html')
| -rw-r--r-- | atom/packages/pretty-json/node_modules/jsonminify/test.minify.html | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/atom/packages/pretty-json/node_modules/jsonminify/test.minify.html b/atom/packages/pretty-json/node_modules/jsonminify/test.minify.html new file mode 100644 index 0000000..3e14281 --- /dev/null +++ b/atom/packages/pretty-json/node_modules/jsonminify/test.minify.html @@ -0,0 +1,89 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<title>Test JSON.minify()</title> + +<script type="text/javascript" src="json2.js"></script> +<script type="text/javascript" src="minify.json.js"></script> + +</head> + +<body> +<h1>Test JSON.minify()</h1> + +<p>test #1</p> +<textarea id="orig_json1" cols="50" rows="12"> +// this is a JSON file with comments +{ + "foo": "bar", // this is cool + "bar": [ + "baz", "bum", "zam" + ], +/* the rest of this document is just fluff + in case you are interested. */ + "something": 10, + "else": 20 +} + +/* NOTE: You can easily strip the whitespace and comments + from such a file with the JSON.minify() project hosted + here on github at http://github.com/getify/JSON.minify +*/ +</textarea> +<p>result #1</p> +<textarea id="new_json1" cols="50" rows="12"></textarea> + + +<p>test #2</p> +<textarea id="orig_json2" cols="50" rows="12"> + +{"/*":"*/","//":"",/*"//"*/"/*/":// +"//"} + +</textarea> +<p>result #2</p> +<textarea id="new_json2" cols="50" rows="12"></textarea> + + +<p>test #3</p> +<textarea id="orig_json3" cols="50" rows="12"> +/* +this is a +multi line comment */{ + +"foo" +: + "bar/*"// something + , "b\"az":/* +something else */"blah" + +} +</textarea> +<p>result #3</p> +<textarea id="new_json3" cols="50" rows="12"></textarea> + + +<p>test #4</p> +<textarea id="orig_json4" cols="50" rows="12"> +{"foo": "ba\"r//", "bar\\": "b\\\"a/*z", + "baz\\\\": /* yay */ "fo\\\\\"*/o" +} +</textarea> +<p>result #4</p> +<textarea id="new_json4" cols="50" rows="12"></textarea> + + + +<script type="text/javascript"> + +var old; +for (var i=1; i<=4; i++) { + old = document.getElementById("orig_json"+i).value; + document.getElementById("new_json"+i).value = JSON.minify(old); +} + +</script> + +</body> +</html> |