Example #1
0
 def render(self, data, media_type=None, renderer_context=None):
     codec = CoreJSONCodec()
     return codec.dump(data, indent=True)
Example #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)
Example #3
0
 def render(self, data, media_type=None, renderer_context=None):
     codec = CoreJSONCodec()
     return codec.dump(data, indent=True)