fix a bunch of json syntax issues (issue 380)