JSON to Python
Paste a JSON object such as name and age to get a typed class User. Use the online cURL generator when you need an HTTP command.
What it is for
Turn an API JSON sample into a Python class with type annotations.
How to use
- Paste a JSON sample and set the class name, for example User.
- Review the generated class and str / int / list annotations.
- Copy the class into a Python file.
FAQ
Is the JSON uploaded?
No. Generation stays in the browser.
How is this different from the online cURL generator?
This page builds a Python class from JSON. The online cURL generator turns an HTTP request into a curl command.
More in this topic: JSON Tools Online