From 104b2d684c90c8613ca41a0b8507cbc03df3bb99 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Tue, 16 Dec 2014 13:54:23 -0800 Subject: [PATCH] Add text/json as a mimetype to try deserializing Fixes #503 --- lib/ansible/modules/network/basics/uri.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/network/basics/uri.py b/lib/ansible/modules/network/basics/uri.py index 95bf5c705f..aac724a8f1 100644 --- a/lib/ansible/modules/network/basics/uri.py +++ b/lib/ansible/modules/network/basics/uri.py @@ -426,7 +426,8 @@ def main(): uresp[ukey] = value if 'content_type' in uresp: - if uresp['content_type'].startswith('application/json'): + if uresp['content_type'].startswith('application/json') or \ + uresp['content_type'].startswith('text/json'): try: js = json.loads(content) uresp['json'] = js