fixing issues with whitespace in json