mirror of https://github.com/ansible/ansible.git
fix uri modul for JSON-escape quotation marks
consider the following response body (content) of a REST/JSON webservice containing escaped quotation marks: ```json { "key": "\"works\"" } ``` decoding this string not as raw will lose the backslash as JSON escape. later json.loads will fail to parse. Inspired by [this thread](https://groups.google.com/forum/#!topic/ansible-project/kymtiloDme4) on the mailing list and the following python shell code: ```python import json string=r'{ "key": "\"works\"" }' json.loads(string) json.loads(string.decode('raw_unicode_escape')) json.loads(string.decode('unicode_escape')) ```reviewable/pr18780/r1
parent
443951ce82
commit
22e1b26bea
Loading…
Reference in New Issue