Difference between revisions of "Python:JSON"
Jump to navigation
Jump to search
m |
m |
||
Line 1: | Line 1: | ||
+ | [[Category:Python]] | ||
;import json | ;import json | ||
:Enable json functions. The json module is standard available (no installation needed) | :Enable json functions. The json module is standard available (no installation needed) |
Revision as of 11:20, 4 May 2018
- import json
- Enable json functions. The json module is standard available (no installation needed)
- json.dumps(dict, indent=4)
- Return the dict nicely structured. Indent each level with 4 spaces.
- Can be used on other datatypes too.