post json data and remove whitespace from json