<html>
<body>
<h2>Convert a JavaScript object into a JSON string, and send it to the server.</h2>
<script>
var myObj = { name: "John", age: 31, city: "New York" };
var myJSON = JSON.stringify(myObj);
window.location = "demo_json52a0.html?x=" + myJSON;
</script>
</body>
<!-- Mirrored from www.w3schools.com/js/tryit.asp?filename=tryjson_send by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 00:41:52 GMT -->
</html>