Commit Graph

4 Commits (22e1b26beae0079f838a6aca0b86948ea6c6c20c)

Author SHA1 Message Date
zitterbacke 22e1b26bea 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'))
```
11 years ago
Toshio Kuratomi 9c6826e928 Add text/json as a mimetype to try deserializing
Fixes #503
11 years ago
Toshio Kuratomi 6317d3a988 Move from md5 to sha1 to work on FIPS-140 enabled systems 11 years ago
Michael DeHaan 0be8798858 Renames. 11 years ago