Пример #1
0
 def render(self, data, media_type=None, renderer_context=None):
     codec = CoreJSONCodec()
     return codec.dump(data, indent=True)
Пример #2
0
 def mockreturn(self, request):
     codec = CoreJSONCodec()
     body = force_text(request.body)
     content = codec.dump(Document(content={'data': json.loads(body)}))
     return MockResponse(content)
Пример #3
0
 def render(self, data, media_type=None, renderer_context=None):
     codec = CoreJSONCodec()
     return codec.dump(data, indent=True)