[Featureserver] simplejson version

Christopher Schmidt crschmidt at metacarta.com
Tue Mar 10 21:20:24 EDT 2009


On Tue, Mar 10, 2009 at 11:27:00AM -0400, Yves Moisan wrote:
> 
> > 
> > I would say that if you really want speed though, you should use cjson.
> 
> So that would mean editing all lines like "from simplejson ..." to "from
> cjson ..." right?  

No. Installing cjson is enough, because the actual feature writing is
done by the vectorformats.Format.GeoJSON, which imports from cjson and
falls back to simplejson. You still need to have simpleson installed fo
the metadata writing, but it won't actually use it for any of the
aspects of it that require performance.

> IIRC there is a way to conditionally import ctypes (or was it
> cString ??) and if not fall back on Python types/strings (can't remember
> the syntax).  Wouldn't that be applicable here so that people don't have
> to edit Python files in FS if they want to use cjson ?  

They already don't have to do this.

> Or is there a
> different fetaureset in cjson that makes it less desirable than
> simplejson as a default choice ?  I read that slashes are not handled
> the same in both libraries ...
> 
> Yves
> 

-- 
Christopher Schmidt
MetaCarta



More information about the Featureserver mailing list