Skip to content

Instantly share code, notes, and snippets.

@naeluh
Created September 19, 2014 22:07
Show Gist options
  • Save naeluh/7e60b8dff6eb39000cb7 to your computer and use it in GitHub Desktop.
Save naeluh/7e60b8dff6eb39000cb7 to your computer and use it in GitHub Desktop.
Test JSON.minify() // source http://jsbin.com/koyut/1
<!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="http://d19f655061aacf3d944b-31672e88ffa6478039e94d7b09f1f706.r22.cf5.rackcdn.com/json2.js"></script>
<script type="text/javascript" src="http://d19f655061aacf3d944b-31672e88ffa6478039e94d7b09f1f706.r22.cf5.rackcdn.com/minify.json.js"></script>
</head>
<body>
<h1>Test JSON.minify()</h1>
<p>test #1</p>
<textarea id="orig_json1" cols="50" rows="12">
</textarea>
<p>result #1</p>
<textarea id="new_json1" cols="50" rows="12"></textarea>
<script id="jsbin-javascript">
var old;
old = document.getElementById("orig_json1").value;
document.getElementById("new_json1").value = JSON.minify(old);
</script>
<script id="jsbin-source-javascript" type="text/javascript">
var old;
old = document.getElementById("orig_json1").value;
document.getElementById("new_json1").value = JSON.minify(old);</script></body>
</html>
var old;
old = document.getElementById("orig_json1").value;
document.getElementById("new_json1").value = JSON.minify(old);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment