mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Fixed #29249 -- Made JSON and YAML serializers use Unicode by default.
This commit is contained in:
parent
8970bb4cfd
commit
68fc21b378
6 changed files with 25 additions and 9 deletions
|
@ -274,6 +274,11 @@ function::
|
|||
Also note that GeoDjango provides a :doc:`customized GeoJSON serializer
|
||||
</ref/contrib/gis/serializers>`.
|
||||
|
||||
.. versionchanged:: 3.1
|
||||
|
||||
All data is now dumped with Unicode. If you need the previous behavior,
|
||||
pass ``ensure_ascii=True`` to the ``serializers.serialize()`` function.
|
||||
|
||||
``DjangoJSONEncoder``
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
@ -315,6 +320,11 @@ again a mapping with the key being name of the field and the value the value::
|
|||
|
||||
Referential fields are again represented by the PK or sequence of PKs.
|
||||
|
||||
.. versionchanged:: 3.1
|
||||
|
||||
All data is now dumped with Unicode. If you need the previous behavior,
|
||||
pass ``allow_unicode=False`` to the ``serializers.serialize()`` function.
|
||||
|
||||
.. _topics-serialization-natural-keys:
|
||||
|
||||
Natural keys
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue