This is Java and PHP sample code for JSON output format.
There are two types of output: JSON code that is based on the original detailed RDF output format, and JSON code that is based on the simple output format.
Included are two Java and two PHP format samples: in both .zip and .tar.gz files. They include code for both the client and server sides as well as documentation and the specification for how RDF was converted to JSON.