mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Added a new GeoJSON serialization format for GeoDjango
Thanks Reinout van Rees for the review.
This commit is contained in:
parent
c5132382f0
commit
35dac5070b
11 changed files with 245 additions and 4 deletions
|
@ -47,6 +47,8 @@ This is useful if you want to serialize data directly to a file-like object
|
|||
:ref:`format <serialization-formats>` will raise a
|
||||
``django.core.serializers.SerializerDoesNotExist`` exception.
|
||||
|
||||
.. _subset-of-fields:
|
||||
|
||||
Subset of fields
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
|
@ -257,6 +259,9 @@ In particular, :ref:`lazy translation objects <lazy-translations>` need a
|
|||
return force_text(obj)
|
||||
return super(LazyEncoder, self).default(obj)
|
||||
|
||||
Also note that GeoDjango provides a :doc:`customized GeoJSON serializer
|
||||
</ref/contrib/gis/serializers>`.
|
||||
|
||||
.. _special encoder: http://docs.python.org/library/json.html#encoders-and-decoders
|
||||
.. _ecma-262: http://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.15
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue