Bug in http app
The bug is here: https://github.com/Shuffle/python-apps/blob/master/http/1.1.0/src/app.py#L102
When sending a string with ', it gets replace to ". This should not happen! What you are trying to do here is make sure the user is using " for the json payload over the key and values, but this is not necessary. See:
import json
import ast
json.dumps(ast.literal_eval("{'a':'b', \"b\":1}"))
# result: '{"a": "b", "b": 1}'
The bug is here: https://github.com/Shuffle/python-apps/blob/master/http/1.1.0/src/app.py#L102
When sending a string with ', it gets replace to ". This should not happen! What you are trying to do here is make sure the user is using " for the json payload over the key and values, but this is not necessary. See:
import json import ast json.dumps(ast.literal_eval("{'a':'b', \"b\":1}")) # result: '{"a": "b", "b": 1}'
ooh, this is a neat trick. Could probably get use for it in the SDK at some point, as we still do have some json parsing issues in very weird scenarios. Thanks!