Skip to content

Instantly share code, notes, and snippets.

@hub-cap
Last active December 16, 2015 00:29
Show Gist options
  • Save hub-cap/5347725 to your computer and use it in GitHub Desktop.
Save hub-cap/5347725 to your computer and use it in GitHub Desktop.
>>> data = '''{
... "mysql": {
... "processname": "mysql",
... "checkinterval": 30,
... "commandtostart": "/etc/init.d/mysql",
... "numbertrystostart": 3
... },
...
... "something_else": {
... "other_thing": "foo"
... }
... }'''
>>>
>>> import json
>>> json_data = json.loads(data)
>>>
>>> json_data['mysql']['processname']
u'mysql'
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment