MCPcopy
hub / github.com/aio-libs/aiohttp / json

Method json

aiohttp/web_reqrep.py:327–335  ·  view source on GitHub ↗

Return BODY as JSON.

(self, *, loads=json.loads, loader=None)

Source from the content-addressed store, hash-verified

325
326 @asyncio.coroutine
327 def json(self, *, loads=json.loads, loader=None):
328 """Return BODY as JSON."""
329 if loader is not None:
330 warnings.warn(
331 "Using loader argument is deprecated, use loads instead",
332 DeprecationWarning)
333 loads = loader
334 body = yield from self.text()
335 return loads(body)
336
337 @asyncio.coroutine
338 def post(self):

Calls 1

textMethod · 0.95