summaryrefslogtreecommitdiff
path: root/django/core/serializers/json.py
Commit message (Collapse)AuthorAgeFilesLines
* Refs #34233 -- Used str.removeprefix()/removesuffix().Mariusz Felisiak2023-01-181-1/+1
|
* Refs #33476 -- Reformatted code with Black.django-bot2022-02-071-11/+12
|
* Fixed #29249 -- Made JSON and YAML serializers use Unicode by default.Hasan Ramezani2020-04-281-0/+1
|
* Refs #16850 -- Removed obsolete simplejson support in JSON serializer.Tim Graham2017-05-201-3/+0
| | | cpython's json version is 2.0.9 so this line is never used.
* Refs #23919 -- Used yield from.Vytis Banaitis2017-02-231-2/+1
|
* Refs #27656 -- Updated django.core docstring verbs according to PEP 257.Anton Samarchyan2017-02-211-7/+4
|
* Refs #23919 -- Removed default 'utf-8' argument for str.encode()/decode().Tim Graham2017-02-091-1/+1
|
* Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand2017-01-251-2/+2
|
* Refs #23919 -- Replaced six.reraise by raiseClaude Paroz2017-01-221-6/+3
|
* Refs #23919 -- Removed six.<various>_types usageClaude Paroz2017-01-181-6/+2
| | | | Thanks Tim Graham and Simon Charette for the reviews.
* Refs #23919 -- Removed encoding preambles and future importsClaude Paroz2017-01-181-3/+0
|
* Removed DateTimeAwareJSONEncoder alias.Tim Graham2016-08-191-3/+0
|
* Fixed #26656 -- Added duration (timedelta) support to DjangoJSONEncoder.Will Hardy2016-07-141-0/+3
|
* Fixed #15091 -- Allowed passing custom encoder to JSON serializer.Berker Peksag2016-06-281-2/+2
|
* Fixed #25468 -- Made DjangoJSONEncoder lazy string awareClaude Paroz2015-09-271-0/+3
| | | | | Thanks Stavros Korokithakis for the report and Tim Graham for the review.
* Reordered import in JSON serializerClaude Paroz2015-06-241-1/+1
|
* Fixed #25019 -- Added UUID support in DjangoJSONEncoderLukas Hetzenecker2015-06-241-1/+4
|
* Sorted imports with isort; refs #23860.Tim Graham2015-02-061-4/+4
|
* Added a new GeoJSON serialization format for GeoDjangoClaude Paroz2014-11-151-1/+4
| | | | Thanks Reinout van Rees for the review.
* More attacking E302 violatorsAlex Gaynor2013-11-021-0/+1
|
* Whitespace cleanup.Tim Graham2013-10-101-1/+0
| | | | | | | * Removed trailing whitespace. * Added newline to EOF if missing. * Removed blank lines at EOF. * Removed some stray tabs.
* Fixed #13182 -- Prevented trailing spaces in indented json outputClaude Paroz2013-08-311-0/+3
| | | | Thanks Stéphane Raimbault for the report and the initial patch.
* Removed most of absolute_import importsClaude Paroz2013-07-291-0/+1
| | | | | Should be unneeded with Python 2.7 and up. Added some unicode_literals along the way.
* Fixed #18003 -- Preserved tracebacks when re-raising errors.konarkmodi2013-03-191-1/+2
| | | | Thanks jrothenbuhler for draft patch, Konark Modi for updates.
* Replaced many smart_bytes by force_bytesClaude Paroz2012-08-291-1/+0
| | | | | | In all those occurrences, we didn't care about preserving the lazy status of the strings, but we really wanted to obtain a real bytestring.
* [py3] Fixed JSON deserializationClaude Paroz2012-08-111-4/+3
|
* [py3] Ported django.utils.encoding.Aymeric Augustin2012-08-071-1/+1
| | | | | | | | | | | * Renamed smart_unicode to smart_text (but kept the old name under Python 2 for backwards compatibility). * Renamed smart_str to smart_bytes. * Re-introduced smart_str as an alias for smart_text under Python 3 and smart_bytes under Python 2 (which is backwards compatible). Thus smart_str always returns a str objects. * Used the new smart_str in a few places where both Python 2 and 3 want a str.
* [py3] Replaced basestring by six.string_types.Aymeric Augustin2012-07-221-1/+2
|
* Fixed #15197 -- Fixed yaml serialization into HttpResponseClaude Paroz2012-06-281-3/+2
| | | | | Thanks fourga38 for the report and hirokiky at gmail.com for the initial patch.
* Favored text (StringIO) over binary content for deserializationClaude Paroz2012-06-151-7/+6
| | | | | This is also more Python 3 compatible, as the json module in Python 3 is expecting text. Thanks Vinay Sajip for noticing it.
* Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.Claude Paroz2012-06-071-1/+4
| | | | | Thanks Vinay Sajip for the support of his django3 branch and Jannis Leidel for the review.
* Fixed #5423 -- Made dumpdata output one row at a time.Claude Paroz2012-05-261-2/+27
| | | | | | This should prevent storing all rows in memory when big sets of data are dumped. See ticket for heroic contributors.
* Replaced cStringIO.StringIO by io.BytesIO.Claude Paroz2012-05-051-2/+2
| | | | | Also replaced StringIO.StringIO by BytesIO in some other appropriate places. StringIO is not available in Python 3.
* Fixed #18013 -- Use the new 'as' syntax for exceptions.Claude Paroz2012-04-291-1/+1
| | | | | Thanks Clueless for the initial patch. Note that unittest has been purposely left out (external package only used by Python 2.6).
* Fixed #18023 -- Removed bundled simplejson.Aymeric Augustin2012-04-291-5/+8
| | | | | | | And started the deprecation path for django.utils.simplejson. Thanks Alex Ogier, Clueless, and other contributors for their work on the patch.
* Fixed the exception handling when deserializing via generators on Python 2.5 ↵Jannis Leidel2012-02-101-0/+2
| | | | | | that was introduced in r17469. Also only test the YAML serializer if PyYAML is installed. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17487 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #11970 -- Wrapped the exception happening during deserialization in ↵Jannis Leidel2012-02-091-2/+9
| | | | | | DeserializationError exceptions. Thanks, Claude Paroz. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17469 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Tweaked changes from r17228 to cater for older simplejson versions.Ramiro Morales2011-12-171-1/+3
| | | | | | | | dump() started accepting the `use_decimal` argument in 2.1.3. Refs #16850. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17229 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #16850 -- Made sure we always represent Decimal instances with JS ↵Ramiro Morales2011-12-171-0/+1
| | | | | | | | | | | | strings when serializing. We force this when calling simplejson dump() to isolate us from changes of default behavior to encode them with JavaScript numbers instead that could introduce loss of precision when decoding back from JSON to Python. Thanks Raphael Hertzog for the report and Bob Ippolito for his help. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17228 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Added support for time zones. Thanks Luke Plant for the review. Fixed #2626.Aymeric Augustin2011-11-181-10/+15
| | | | | | | | | For more information on this project, see this thread: http://groups.google.com/group/django-developers/browse_thread/thread/cf0423bbb85b1bbf git-svn-id: http://code.djangoproject.com/svn/django/trunk@17106 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #14888 -- Removing duplicated code in serialisers. Thanks to eric.fortin.Andrew Godwin2011-01-081-3/+0
| | | | git-svn-id: http://code.djangoproject.com/svn/django/trunk@15163 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #12164 -- Removed the Python 2.3 compatibility imports and ↵Russell Keith-Magee2010-05-041-5/+1
| | | | | | workarounds. Thanks to timo and claudep for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13094 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #1142 -- Added multiple database support.Russell Keith-Magee2009-12-221-1/+1
| | | | | | | | | | | | | | | | | This monster of a patch is the result of Alex Gaynor's 2009 Google Summer of Code project. Congratulations to Alex for a job well done. Big thanks also go to: * Justin Bronn for keeping GIS in line with the changes, * Karen Tracey and Jani Tiainen for their help testing Oracle support * Brett Hoerner, Jon Loyens, and Craig Kimmerer for their feedback. * Malcolm Treddinick for his guidance during the GSoC submission process. * Simon Willison for driving the original design process * Cal Henderson for complaining about ponies he wanted. ... and everyone else too numerous to mention that helped to bring this feature into fruition. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11952 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #7052 -- Added support for natural keys in serialization.Russell Keith-Magee2009-12-141-0/+1
| | | | git-svn-id: http://code.djangoproject.com/svn/django/trunk@11863 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #7990 -- Modified serializers to use StringIO, rather than cStringIO, ↵Russell Keith-Magee2008-07-301-5/+4
| | | | | | due to potential unicode issues. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8151 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #1443 -- Django's various bits now support dates before 1900. Thanks ↵Adrian Holovaty2008-07-181-3/+6
| | | | | | to SmileyChris, Chris Green, Fredrik Lundh and others for patches and design help git-svn-id: http://code.djangoproject.com/svn/django/trunk@7946 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #6481 -- Fixed a bunch of import problems (and some whitespace cleanups).Malcolm Tredinnick2008-02-191-1/+0
| | | | | | | Found by Bastian Kleineidam with help from pyflakes. Thanks. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7131 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #6110 -- Mark the python format serializer as for internal use only. ↵Malcolm Tredinnick2007-12-171-0/+2
| | | | | | Thanks, empty. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6922 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #3466 -- Fixed problem with specifyin a 'fields' argument to a JSON ↵Russell Keith-Magee2007-06-011-0/+2
| | | | | | serializer. Also added documenation for the 'fields' argument. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5409 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Removed some cruft left over from fixing problems in the move to DecimalFieldMalcolm Tredinnick2007-05-211-23/+0
| | | | | | | ([5302]). git-svn-id: http://code.djangoproject.com/svn/django/trunk@5311 bcc190cf-cafb-0310-a4f2-bffc1f526a37