[Qgis-developer] Manipulating JSON files from Python

Andreas Neumann a.neumann at carto.net
Wed Nov 14 06:05:49 PST 2012


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 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 Webclient), like this one:
>> http://webgis.uster.ch/qgis-web-client-dev/js/GISProjectListing.js
>>
>> The tool should import the JSON file, change some values and write it back.
>>
>> The idea would be to update, e.g. the time the data was last updated or
>> other values.
>>
>> My questions:
>>
>> * what library should I use? SimpleJSON? Others?
>>
>> * Does someone have sample code around that does something similar?
>>
>> Thanks,
>> Andreas
>>
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
> 
> 
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
> 



More information about the Qgis-developer mailing list