ParserΒΆ

API-Reference: wsgi_tools.parser()

This includes the two WSGI-apps wsgi_tools.parser.JSONParser() and wsgi_tools.parser.XMLParser().

Both read the content of the request and parse it. The wsgi_tools.parser.JSONParser() as a json-string and the wsgi_tools.parser.XMLParser() as a xml-string.

The wsgi_tools.parser.JSONParser() writes this to the attribute wsgi_tools.parser.JSONParser.json_content(). The wsgi_tools.parser.XMLParser() writes this to the attribute wsgi_tools.parser.XMLParser.root_element().

The raw bytes content is accessible in wsgi_tools.parser.JSONParser.raw_content() or in wsgi_tools.parser.XMLParser.raw_content().