From 3d15adaeb11a2f2f2961280026232743afc61398 Mon Sep 17 00:00:00 2001 From: tom christie tom@tomchristie.com Date: Tue, 26 Apr 2011 20:20:31 +0100 Subject: Fixes #35 - Import json from django's built-in package (Does cleverness in determing best lib to use) --- djangorestframework/parsers.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'djangorestframework/parsers.py') diff --git a/djangorestframework/parsers.py b/djangorestframework/parsers.py index 1503342c..35003a0f 100644 --- a/djangorestframework/parsers.py +++ b/djangorestframework/parsers.py @@ -9,16 +9,13 @@ We need a method to be able to: and multipart/form-data. (eg also handle multipart/json) """ from django.http.multipartparser import MultiPartParser as DjangoMPParser +from django.utils import simplejson as json + from djangorestframework.response import ResponseException from djangorestframework import status from djangorestframework.utils import as_tuple from djangorestframework.mediatypes import MediaType -try: - import json -except ImportError: - import simplejson as json - try: from urlparse import parse_qs except ImportError: -- cgit v1.2.3