Corrected json output

corrected some errors regarding the json to be written