Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<html>
<head>
<script>
window.onload = function(){
var obj = {hoge: "nya", nya: {hoge: 123}};
var content = JSON.stringify(obj);
var uriContent = "data:application/json," + encodeURIComponent(content);
var newWindow=window.open(uriContent, 'hoge.json');
};
</script>
</head>
<body>
Hello
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment