JSON¶
To use JSON inputs use dict
as Argument type
it will do something like
import json
data = json.loads(user_input)
Usage¶
You will get all the correct editor support, attributes, methods, etc for the dict object:
Check it:
// 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}