diff --git a/docs/tutorial/parameter-types/json.md b/docs/tutorial/parameter-types/json.md new file mode 100644 index 0000000000..4b09b09b0c --- /dev/null +++ b/docs/tutorial/parameter-types/json.md @@ -0,0 +1,37 @@ +# JSON + +To use JSON inputs use `dict` as Argument type + +it will do something like + +```python +import json + +data = json.loads(user_input) +``` + +## Usage + +You will get all the correct editor support, attributes, methods, etc for the dict object:` + +//// tab | Python 3.7+ + +```Python hl_lines="5" +{!> ../docs_src/parameter_types/json/tutorial001.py!} +``` + +//// + +Check it: + +
+ +```console +// Run your program +$ python main.py --user-info '{"name": "Camila", "age": 15, "height_meters": 1.7, "female": true}' + +User Info: {"name": "Camila", "age": 15, "height_meters": 1.7, "female": true} + +``` + +