Skip to main content

HJSON   Badge License

*A parser / stringifier for HJSON.*


Import

import HJson from 'https://deno.land/x/hjson/mod.ts'


Parsing

import { parse } from 'https://deno.land/x/hjson/mod.ts'

const { log } = console;

const hjson = `{
    some : 3
    variables : [
        with ,
        a
        lot
    ]
    inside : {
        them : 9
    }
}`

log(parse(hjson));


/*
 *  {
 *      some : 3 ,
 *      variables : [ 'with' , 'a' , 'lot' ] ,
 *      inside : { them : 9 }
 *  }
 */


Stringification

Work In Progress