This page is under construction.
The Javascript RJson library can be used to:
Install really-relaxed-json from NPM https://www.npmjs.com/package/really-relaxed-json
npm install --save really-relaxed-json
var parser = require('really-relaxed-json').createParser();
var parserFactory = require('really-relaxed-json').createParserFactory();
var PrettyPrinter = require('really-relaxed-json').PrettyPrinter;
Include these files in your <head>
<script src="web/kotlin.js" type="text/javascript"></script>
<script src="web/output-min.js" type="text/javascript"></script>
<script>
var parser = output.tv.twelvetone.rjson.RJsonParserFactory.Companion.getDefault().createParser();
const PrettyPrinter = output.tv.twelvetone.rjson.PrettyPrinter;
</script>
// Call the parse method
var jsonValue = parser.stringToValue('[milk eggs beer {amount:5.44 tax:.99} ]';
var jsonString = parser.stringToJson('[milk eggs beer {amount:5.44 tax:.99} ]';
You can pretty print a Json or RJson document by setting the PrettyPrinter options.
Customize the options.
var opts = new PrettyPrinter.Options();
opts.useQuotes = true;
opts.useArrayCommas = true;
opts.useObjectCommas = true;
opts.objectItemNewline = true;
opts.arrayItemNewline = true;
Or use one of the presets.
var opts
opts = PrettyPrinter.Options.JsonCompact
opts = PrettyPrinter.Options.JsonPretty
opts = PrettyPrinter.Options.RJsonCompact
opts = PrettyPrinter.Options.RJsonPretty
var prettyPrinter = new PrettyPrinter(opts);
var prettyString = prettyPrinter.valueToString(json);