A json parser
Project description
Introduction
This is a json parser. It understands everything within brackets. That means, you will give it anything like
{‘activePolygonId’:null,’polygons’:null,’route’:null}
Of course deeply nested arrays are fully supported without a limit.
Copyright / License
GPLv3
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
d9t.json
>>> from d9t.json import parser
Let’s define some json data.
>>> json = """ {'data1':null, 'data2':'something', 'data3':[1,2,3,'string',true,{'datanested':'something','floatdata':44.22, 'bool':false}]} """ >>> domparser = parser.JsDomParser(json) >>> data = domparser.parse() >>> data {'data1': None, 'data3': [1, 2, 3, 'string', True, {'datanested': 'something', 'bool': False, 'floatdata': 44.219999999999999}], 'data2': 'something'}
That’s it ;)
Changelog
0.3* - splitted off from google.directions
Initial release
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.