Fixed JSON bugs, replacing # works. Added tests like the ones found in 4store-graph-client.