From 37a090fae7d6089570906a900b62747bd69f074e Mon Sep 17 00:00:00 2001 From: John Greeley <JohnGreeley@users.noreply.github.com> Date: Fri, 11 Aug 2017 19:23:49 -0400 Subject: [PATCH] adding OrderedDict as object_pairs_hook (#171) --- mwclient/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mwclient/client.py b/mwclient/client.py index a954fdf..d1d58b3 100644 --- a/mwclient/client.py +++ b/mwclient/client.py @@ -415,7 +415,7 @@ class Site(object): http_method=http_method) try: - return json.loads(res) + return json.loads(res, object_pairs_hook=OrderedDict) except ValueError: if res.startswith('MediaWiki API is not enabled for this site.'): raise errors.APIDisabledError -- GitLab