summaryrefslogtreecommitdiff
path: root/django/core/serializers/json.py
AgeCommit message (Collapse)Author
2025-03-11Fixed #36177 -- Added a trailing newline to JSON serializer. (#19232)Tom Carrick
2024-09-17Fixed #29522 -- Refactored the Deserializer functions to classes.Amir Karimi
Co-authored-by: Emad Mokhtar <emad.mokhtar@veneficus.nl>
2023-01-18Refs #34233 -- Used str.removeprefix()/removesuffix().Mariusz Felisiak
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2020-04-28Fixed #29249 -- Made JSON and YAML serializers use Unicode by default.Hasan Ramezani
2017-05-20Refs #16850 -- Removed obsolete simplejson support in JSON serializer.Tim Graham
cpython's json version is 2.0.9 so this line is never used.
2017-02-23Refs #23919 -- Used yield from.Vytis Banaitis
2017-02-21Refs #27656 -- Updated django.core docstring verbs according to PEP 257.Anton Samarchyan
2017-02-09Refs #23919 -- Removed default 'utf-8' argument for str.encode()/decode().Tim Graham
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-22Refs #23919 -- Replaced six.reraise by raiseClaude Paroz
2017-01-18Refs #23919 -- Removed six.<various>_types usageClaude Paroz
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2016-08-19Removed DateTimeAwareJSONEncoder alias.Tim Graham
2016-07-14Fixed #26656 -- Added duration (timedelta) support to DjangoJSONEncoder.Will Hardy
2016-06-28Fixed #15091 -- Allowed passing custom encoder to JSON serializer.Berker Peksag
2015-09-27Fixed #25468 -- Made DjangoJSONEncoder lazy string awareClaude Paroz
Thanks Stavros Korokithakis for the report and Tim Graham for the review.
2015-06-24Reordered import in JSON serializerClaude Paroz
2015-06-24Fixed #25019 -- Added UUID support in DjangoJSONEncoderLukas Hetzenecker
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2014-11-15Added a new GeoJSON serialization format for GeoDjangoClaude Paroz
Thanks Reinout van Rees for the review.
2013-11-02More attacking E302 violatorsAlex Gaynor
2013-10-10Whitespace cleanup.Tim Graham
* Removed trailing whitespace. * Added newline to EOF if missing. * Removed blank lines at EOF. * Removed some stray tabs.
2013-08-31Fixed #13182 -- Prevented trailing spaces in indented json outputClaude Paroz
Thanks Stéphane Raimbault for the report and the initial patch.
2013-07-29Removed most of absolute_import importsClaude Paroz
Should be unneeded with Python 2.7 and up. Added some unicode_literals along the way.
2013-03-19Fixed #18003 -- Preserved tracebacks when re-raising errors.konarkmodi
Thanks jrothenbuhler for draft patch, Konark Modi for updates.
2012-08-29Replaced many smart_bytes by force_bytesClaude Paroz
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.
2012-08-11[py3] Fixed JSON deserializationClaude Paroz
2012-08-07[py3] Ported django.utils.encoding.Aymeric Augustin
* 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.
2012-07-22[py3] Replaced basestring by six.string_types.Aymeric Augustin
2012-06-28Fixed #15197 -- Fixed yaml serialization into HttpResponseClaude Paroz
Thanks fourga38 for the report and hirokiky at gmail.com for the initial patch.
2012-06-15Favored text (StringIO) over binary content for deserializationClaude Paroz
This is also more Python 3 compatible, as the json module in Python 3 is expecting text. Thanks Vinay Sajip for noticing it.
2012-06-07Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.Claude Paroz
Thanks Vinay Sajip for the support of his django3 branch and Jannis Leidel for the review.
2012-05-26Fixed #5423 -- Made dumpdata output one row at a time.Claude Paroz
This should prevent storing all rows in memory when big sets of data are dumped. See ticket for heroic contributors.
2012-05-05Replaced cStringIO.StringIO by io.BytesIO.Claude Paroz
Also replaced StringIO.StringIO by BytesIO in some other appropriate places. StringIO is not available in Python 3.
2012-04-29Fixed #18013 -- Use the new 'as' syntax for exceptions.Claude Paroz
Thanks Clueless for the initial patch. Note that unittest has been purposely left out (external package only used by Python 2.6).
2012-04-29Fixed #18023 -- Removed bundled simplejson.Aymeric Augustin
And started the deprecation path for django.utils.simplejson. Thanks Alex Ogier, Clueless, and other contributors for their work on the patch.
2012-02-10Fixed the exception handling when deserializing via generators on Python 2.5 ↵Jannis Leidel
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
2012-02-09Fixed #11970 -- Wrapped the exception happening during deserialization in ↵Jannis Leidel
DeserializationError exceptions. Thanks, Claude Paroz. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17469 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17Tweaked changes from r17228 to cater for older simplejson versions.Ramiro Morales
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
2011-12-17Fixed #16850 -- Made sure we always represent Decimal instances with JS ↵Ramiro Morales
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
2011-11-18Added support for time zones. Thanks Luke Plant for the review. Fixed #2626.Aymeric Augustin
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
2011-01-08Fixed #14888 -- Removing duplicated code in serialisers. Thanks to eric.fortin.Andrew Godwin
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15163 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-04Fixed #12164 -- Removed the Python 2.3 compatibility imports and ↵Russell Keith-Magee
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
2009-12-22Fixed #1142 -- Added multiple database support.Russell Keith-Magee
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
2009-12-14Fixed #7052 -- Added support for natural keys in serialization.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11863 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-30Fixed #7990 -- Modified serializers to use StringIO, rather than cStringIO, ↵Russell Keith-Magee
due to potential unicode issues. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8151 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-18Fixed #1443 -- Django's various bits now support dates before 1900. Thanks ↵Adrian Holovaty
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
2008-02-19Fixed #6481 -- Fixed a bunch of import problems (and some whitespace cleanups).Malcolm Tredinnick
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
2007-12-17Fixed #6110 -- Mark the python format serializer as for internal use only. ↵Malcolm Tredinnick
Thanks, empty. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6922 bcc190cf-cafb-0310-a4f2-bffc1f526a37