I just realized that json.dumps()
adds spaces in the JSON object
e.g.
{'duration': '02:55', 'name': 'flower', 'chg': 0}
how can remove the spaces in order to make the JSON more compact and save bytes to be sent via HTTP?
such as:
{'duration':'02:55','name':'flower','chg':0}
json.dumps(separators=(',', ':'))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With