i need a config file processing library for use in pir code--something
like perl's Config::IniFiles. a wrapper around JSON.pir should work
just as well. it doesn't need to be fancy, just allow me to read a
human-readable config file format into a pmc, and vice versa.
~jerry
.sub main :main
load_bytecode 'Config/JSON.pbc'
.local pmc reader, writer
reader = get_global [ 'Config' ; 'JSON' ], 'ReadConfig'
writer = get_global [ 'Config' ; 'JSON' ], 'WriteConfig'
.local pmc config
config = reader('foo.json')
$P1 = new Hash
$P1['stuff'] = 'this'
$P1['other'] = 'that'
config["supplemental"] = $P1
writer(config, 'bar.json', 'compact'=>1)
.end