...
Code Block | ||
---|---|---|
| ||
# Encoding Python dictionary to JSON string data = {"name": "Johnny", "last_name": "Silverhand", "age": 34, "city": "Night City"} json_string = json.dumps(data) printlogger.info(json_string) # Decoding JSON string back to Python dictionary decoded_data = json.loads(json_string) printlogger.info(decoded_data) |
pipy package → None (python bundle library)