Compress the json and remove spaces