var params = {"type": "1",
"value": "2"}
var str = JSON.stringify(params);
str outputs"{"type": "1", "value": "2"}", and the original space is removed;
if you want to keep the space after the colon, output"{"type": "1", "value": "2"}", is there any good way besides the repalce method?