Thanks, Matt. +1 on geojsonlib and an interface for simplejson's peers.

Cheers,
Sean

Matthew Russell wrote:
> Hi  Sean,
> 
> In an effort to find a suitable name, I've been looking around at the the
> other implementations.  It seems that most call their main class "GeoJSON"
> (java version in geoengine by google, OpenLayers.Format.GepJSON, GeoServer's
> "GeoJSONBuilder".
> 
> The difference is that all the other implementations I could find live
> within another project, where as the PCL GeoJSON is a top level package name
> for python.
> 
> For futher comparisom, I've looked at json.org, which lists the following
> available JSON implementaitons for Python.
> 
> Here, I've listed the link and the corrosponding (import name) and number of
> downloads of the main ones.
> 
>    - jsonlib <http://pypi.python.org/pypi/jsonlib/>.(jsonlib) 777
>    - python-cjson <http://pypi.python.org/pypi/python-cjson/>.  (cjson) 4558
>    - python-json <http://pypi.python.org/pypi/python-json/>. (json) n/a
>    - simplejson <http://pypi.python.org/pypi/simplejson/>. (simplejson)
>    9058
> 
> 
> As you can see, all are named after the standard.
> 
> The Python stdlib has xml, xmlrpclib etc, so it sets the precedent of takng
> the name of a standard (e.g XML) and making other implementations (thinking
> 4suite, elementree) chooose different names.
> 
> However, I sympathise with, and understand your desire not to have confusion
> between the standard.
> 
> The name I've chosen is "geojsonlib".
> 
> I think it short enough, and in the spirit of other python packages.
> 
> I hope you concur.
> 
> Do you think we could have it listed at
> http://wiki.geojson.org/Main_Page#Example_Implementations along with the
> others?
> 
> Cheers,
> Matt
> 
> PS.
> 
> FWIW,  i think that PCL GeoJSON need not require simplejson - we can just
> require a certain interface, which then any of the other Python json
> packages listed above could then implement.
> 
> e.g.
> 
>>>> obj = geojson.loads(json, encoder="geojson.encoding"')
>>>> json = geojson.dumps(obj, decoder="geojson.encoding")
> 
> Here, geojsson.{dump, dumps. loads,load} become factory functions  which
> simply  __import__  the {encoder,decoder},
> which  by default is the currenly implemenation which imports simepljson.
> However, if someone wants to use another module, they just need to write a
> small adapter.
> 
> e.g
> 
> lets say cjson, you'd just write a small wrapper for cjson which is some
> namespace with dump, dumps,load and loads defined.
> 
> Where the encoder has the following interface:
> 
>  - encoder.dumps(data)
>  - encoder.loads(data)
> 
> We don't lose anything since folks currently neecd to install simplejson
> anyway. We'd just need to document the API, and ship the current
> geojson.encoding as the example (and default) encoder/decode used by
> geojson.
> 
> With that in place, there'd be less reason/motivation for other
> implementations ;)
> 
> 2008/6/16 Sean Gillies <[EMAIL PROTECTED]>:
> 
>> The project we've called "GeoJSON" is still up to date, but I'd still
>> like to rename it to avoid unnecessary confusion. Matt, since you've
>> done the lion's share of the work, I will defer to you -- but
>> "simplegeojson" (from previous discussion) seems overly long to me and
>> kinda encroaches on "simplejson".
>>
>> Sean
>>
>> The GeoJSON Authors are proud to announce the finalization of the
>> GeoJSON 1.0 Specification.
>>
>> Representing more than a year's worth of community discussion and
>> development, the GeoJSON specification describes an easy to use,
>> extensible format for transferring geographic data over the web. With
>> support in more than 20 different applications, GeoJSON is already
>> quickly becoming a de facto standard for transferring geographic data in
>> a JSON format. The finalization of the spec represents the final step in
>> formalizing the GeoJSON format for encoding this data.
>>
>> More information on GeoJSON can be found at http://geojson.org/ , or
>> from the GeoJSON mailing list at
>> http://lists.geojson.org/listinfo.cgi/geojson-geojson.org .
>>
>> Regards,
>> --
>> Christopher Schmidt
>> MetaCarta
>> _______________________________________________
>> Geojson mailing list
>> [EMAIL PROTECTED]
>> http://lists.geojson.org/listinfo.cgi/geojson-geojson.org
>>
>>
>> _______________________________________________
>> Community mailing list
>> [email protected]
>> http://lists.gispython.org/mailman/listinfo/community
>>
>>
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Community mailing list
> [email protected]
> http://lists.gispython.org/mailman/listinfo/community

_______________________________________________
Community mailing list
[email protected]
http://lists.gispython.org/mailman/listinfo/community

Reply via email to