kw123 wrote:but now the string is 2 times as long.
If you're talking about what's PUTted to the RESTful API, that shouldn't matter (it's not long enough for it to be an issue on the IWS side).
If you're talking about what's stored in the Indigo variable, it's also not an issue but you can always just delete the keys you don't need before you create/send the JSON. If you're getting the JSON from somewhere else, then convert it to a Python dict, remove the keys you don't need, then convert it back to JSON before you send it. You can also compress the JSON a bit by removing the spaces after the key: part:
- Code: Select all
json.dumps(my_dict, separators=(',',':'))
will remove the extra spaces.