Skip to main content
Deno 2 is finally here 🎉️
Learn more

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