JSON processing in Python: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 4: | Line 4: | ||
* [[Python#Code_Examples|Python]] | * [[Python#Code_Examples|Python]] | ||
=Overview= | =Overview= | ||
<syntaxhighlight lang='python'> | |||
import json | |||
data = json.loads('{"color":"blue", "size":10}') | |||
print(data.get("color")) | |||
print(data.get("size")) | |||
</syntaxhighlight> |
Revision as of 07:26, 12 January 2022
External
Internal
Overview
import json
data = json.loads('{"color":"blue", "size":10}')
print(data.get("color"))
print(data.get("size"))