def lowdata_fmt():
 if (cherrypy.request.method.upper() != 'POST'):
  return
 data = cherrypy.request.unserialized_data
 if (data and isinstance(data, collections.Mapping)):
  if (('arg' in data) and (not isinstance(data['arg'], list))):
   data['arg'] = [data['arg']]
  cherrypy.request.lowstate = [data]
 else:
  cherrypy.serving.request.lowstate = data

def lowdata_fmt ( ) : if ( cherrypy . request . method . upper ( ) != 'POST' ) : return data = cherrypy . request . unserialized_data if ( data and isinstance ( data , collections . Mapping ) ) : if ( ( 'arg' in data ) and ( not isinstance ( data [ 'arg' ] , list ) ) ) : data [ 'arg' ] = [ data [ 'arg' ] ] cherrypy . request . lowstate = [ data ] else : cherrypy . serving . request . lowstate = data
validate and format lowdata from incoming unserialized request data this tool requires that the hypermedia_in tool has already been run .