Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
59 lines (57 sloc) 1.89 KB
<!doctype html>
<html class="no-js" lang="en">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>JSONLint Fork</title>
<meta name="description" content="">
<link rel="stylesheet" href="web/style.css">
<div id="container">
<div id="main" role="main">
<h1>JSON Lint</h1>
<p>A pure JavaScript version of the service provided at <a href=""></a>.</p>
<textarea id="source" rows="20" cols="50">
<button id="button">Validate</button>
<input type="checkbox" value="yes" id="reformat" /><label for="reformat">reformat JSON</label>
<pre id="result"></pre>
<p><a href="">project on github</a></p>
</div> <!--! end of #container -->
<!-- JavaScript at the bottom for fast page loading -->
<!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if offline -->
<script src="web/json2.js"></script>
<script src="web/jsonlint.js"></script>
<script src="//"></script>
<script>window.jQuery || document.write('<script src="web/jquery-1.6.1.min.js"><\/script>')</script>
<script type="text/javascript" charset="utf-8">
try {
var sourceTextArea = $("#source");
var result = jsonlint.parse(sourceTextArea.val());
var resultBox = $("#result");
var reformatCheckBox = $('#reformat');
if(result) {
resultBox.text('JSON is valid!')
if(reformatCheckBox.prop('checked')) {
sourceTextArea.val(JSON.stringify(result, null, " "));
} catch(e) {
Jump to Line
Something went wrong with that request. Please try again.