mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-04 20:40:14 +03:00
Merge 89fa0d53cc
into d2286ba658
This commit is contained in:
commit
07ffec7fd0
|
@ -99,6 +99,13 @@ class JSONRenderer(BaseRenderer):
|
|||
else:
|
||||
separators = INDENT_SEPARATORS
|
||||
|
||||
if type(data) is dict:
|
||||
ret = json.dumps(
|
||||
data, cls=self.encoder_class,
|
||||
indent=indent, ensure_ascii=self.ensure_ascii,
|
||||
separators=separators, sort_keys=True
|
||||
)
|
||||
else:
|
||||
ret = json.dumps(
|
||||
data, cls=self.encoder_class,
|
||||
indent=indent, ensure_ascii=self.ensure_ascii,
|
||||
|
|
Loading…
Reference in New Issue
Block a user