@process_request_body
def json_processor(entity):
 body = entity.fp.read()
 try:
  cherrypy.serving.request.unserialized_data = json.loads(body)
 except ValueError:
  raise cherrypy.HTTPError(400, 'Invalid JSON document')
 cherrypy.serving.request.raw_body = body

@ process_request_body def json_processor ( entity ) : body = entity . fp . read ( ) try : cherrypy . serving . request . unserialized_data = json . loads ( body ) except ValueError : raise cherrypy . HTTPError ( 400 , 'Invalid JSON document' ) cherrypy . serving . request . raw_body = body
read application/json data into request .