Re: [Qgis-developer] Manipulating JSON files from Python

2012-11-15 Thread Andreas Neumann
Hi Noli, Thanks for your hint, but as Peteris said, I am not dealing with flat data structure (tabular data), but with nested data structure (more like typical xml files). I think I will try with the builtin json module as most people suggested. Andreas Am 15.11.2012 08:49, schrieb Noli Sicad:

Re: [Qgis-developer] Manipulating JSON files from Python

2012-11-14 Thread Matthias Kuhn
Why not use the default python library? It will probably give the least dependency problems. http://docs.python.org/2/library/json.html On Wed, 2012-11-14 at 14:02 +0100, Andreas Neumann wrote: Hi all, I would like to write small utility to manipulate metadata in a JSON file (for QGIS

Re: [Qgis-developer] Manipulating JSON files from Python

2012-11-14 Thread Andreas Neumann
Thanks all for your hints. Will have a look at the built-in json module. Will have to find out how the dictionary looks like, that python is generating and how to traverse it. Thanks, Andreas Am 14.11.2012 14:19, schrieb Matthias Kuhn: Why not use the default python library? It will probably

Re: [Qgis-developer] Manipulating JSON files from Python

2012-11-14 Thread Noli Sicad
This might help. Tablib: Pythonic Tabular Datasets http://docs.python-tablib.org/en/latest/ tablib.Dataset() A Dataset is a table of tabular data. It may or may not have a header row. They can be build and manipulated as raw Python datatypes (Lists of tuples|dictionaries). Datasets can be

Re: [Qgis-developer] Manipulating JSON files from Python

2012-11-14 Thread Noli Sicad
Editing while reading in tablib - pull request https://github.com/kennethreitz/tablib/pull/84 Noli On 11/15/12, Pēteris Brūns p...@sungis.lv wrote: Probably in other case yes, but for Andreas required things better is to use python built in functionality and escape from external