From 97f034e3d65068f7bd1e982e6fd251222a4feea1 Mon Sep 17 00:00:00 2001 From: Pablo Recio Date: Sat, 18 May 2013 16:31:12 +0200 Subject: Adds UnicodeJSONRenderer which doesn't ensure ascii --- rest_framework/renderers.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'rest_framework/renderers.py') diff --git a/rest_framework/renderers.py b/rest_framework/renderers.py index d55a3e0e..12e1107f 100644 --- a/rest_framework/renderers.py +++ b/rest_framework/renderers.py @@ -76,6 +76,10 @@ class JSONRenderer(BaseRenderer): return json.dumps(data, cls=self.encoder_class, indent=indent, ensure_ascii=self.ensure_ascii) +class UnicodeJSONRenderer(JSONRenderer): + ensure_ascii = False + + class JSONPRenderer(JSONRenderer): """ Renderer which serializes to json, -- cgit v1.2.3