Rodrigo Girão Serrão 🐍🚀 @mathspp.com · Jan 20

Convert data to a JSON string without writing to a file: Just use `json.dumps`! (The final S stands for String!) ```py import json data = {"k1": True, "k2": [73, 42, 10]} s = json.dumps(data) print(type(s), s) # <class 'str'> {"k1": true, "k2": [73, 42, 10]} ```

1 likes 1 replies

?

Replies

ax3man1ac · Jan 20

I take it load/loads are coming in the next post? :p