'If the ``Content-Type`` header is ``application/json``, this
property holds the parsed content of the request body. Only requests
smaller than :attr:`MEMFILE_MAX` are processed to avoid memory
exhaustion.'

@DictProperty('environ', 'bottle.request.json', read_only=True)
def json(self):

    if ((self.environ.get('CONTENT_TYPE') == 'application/json') and (0 < self.content_length < self.MEMFILE_MAX)):
        return json_loads(self.body.read(self.MEMFILE_MAX))
    return None
