wrote a ton of tests for json, beefed up php tests