26 lines
563 B
HTML
26 lines
563 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>JSON VIEW</title>
|
|
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
|
|
<link rel="stylesheet" type="text/css" href="jsonview.css">
|
|
<script type="text/javascript" src="jsonview.js"></script>
|
|
</head>
|
|
<body>
|
|
<div class="root"></div>
|
|
|
|
<script type="text/javascript">
|
|
fetch('example.json')
|
|
.then((res)=> {
|
|
return res.text();
|
|
})
|
|
.then((data) => {
|
|
jsonView.format(data, '.root');
|
|
})
|
|
.catch((err) => {
|
|
console.log(err);
|
|
})
|
|
</script>
|
|
</body>
|
|
</html>
|