A JSON parser written in Python.
Project description
jsonmgnt
A simple JSON parsing tool.
Installation
Install it via pip:
pip install jsonmgnt
Usage
import jsonmgnt
dat2 = jsonmgnt.parse('{"Invoker": "SunStrike"}')
print(dat2['Invoker']) # SunStrike
dat1 = jsonmgnt.parse('{"Hammer Level": 25}')
print(dat1['Hammer Level']) # 25
The examples using the find_keys().
data = [
{"key": 1},
{"key": 2},
{"my":
{"key":
{
"chain": "A",
"rope": 5,
"string": 1.2,
"cable": False
}
}
},
{"your":
{"key":
{
"chain": "B",
"rope": 7,
"string": 0.7,
"cable": True
}
}
}
]
p.find_keys(data, ['rope', 'cable'])
[[5, False], [7, True]]
p.find_keys(data, ['rope', 'cable'], group=False)
[5, False, 7, True]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
jsonmgnt-1.1.1.tar.gz
(6.8 kB
view hashes)