summaryrefslogtreecommitdiff
path: root/simplejson/encoder.py
Commit message (Collapse)AuthorAgeFilesLines
* Bump version, update changelog, fix issues identified in code review of #143Bob Ippolito2016-10-281-1/+5
|
* Merge branch 'raw_json' of https://github.com/lamflam/simplejson into ↵Bob Ippolito2016-10-281-0/+10
|\ | | | | | | lamflam-raw_json
| * Add support for preprocessed JSON strings (with optimizations) in encoderKevin LaFlamme2016-09-011-0/+10
| | | | | | | | In some situations, you may have a large python dictionary you need to JSONify but one of the values inside the dict is already a JSON string. This is common when pulling an object from a database, for example, where one of the fields is a JSON blob/string. Previously you would have to deserialize and then reserialize that string just to serialize the high level object, but obviously this is unnecessarily slow. This changes adds a method/type that can be used to wrap a str and tell the serializer to just pass it through instead.
* | Fixes #144. Workaround for bad behavior in string subclasses.Bob Ippolito2016-10-211-1/+9
|/
* Fix issue with iterable_as_array and indent option, closes #128v3.8.1Bob Ippolito2015-10-271-4/+8
|
* Merge branch 'master' into iterable_as_array-gh1Nick Babcock2015-07-101-125/+248
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: CHANGES.txt conf.py index.rst setup.py simplejson/__init__.py simplejson/_speedups.c simplejson/encoder.py simplejson/tests/test_tuple.py
| * fix typo in e18cc09v3.7.3Bob Ippolito2015-05-311-1/+1
| |
| * attempt to work around an issue with reloading the Decimal modulev3.7.2Bob Ippolito2015-05-221-4/+7
| |
| * no longer trust custom repr for int/long/float subclasses #118v3.7.0Bob Ippolito2015-05-181-0/+9
| |
| * consistently reject int_as_string_bitcount <= 0 #96v3.5.1Bob Ippolito2014-05-221-1/+3
| |
| * clean up #96 and prep for v3.5.0 releaseBob Ippolito2014-05-211-5/+3
| |
| * Adding `int_as_string_bitcount` optionColin Deasy2014-05-141-24/+44
| |
| * ignore_nan #63ecma-262-63Bob Ippolito2013-05-011-4/+12
| |
| * make argument order for c_make_encoder match make_iterencodeBob Ippolito2013-05-011-2/+2
| |
| * Implement for_json kwarg; pure Python version; add tests; update documentation.shakefu2013-04-171-28/+46
| |
| * Updated documentation to reflect separators behavior when indent is not None ↵Bob Ippolito2013-02-221-3/+4
| | | | | | | | (#59)
| * v3.0.6, fixes ensure_ascii=False regression (#50)v3.0.6Bob Ippolito2013-01-111-1/+4
| |
| * clean up skipkeys/stringification in C APIBob Ippolito2012-12-301-0/+1
| |
| * more coverage, decimal key coercionBob Ippolito2012-12-291-1/+3
| |
| * First pass at Python 3.3 compatibilityBob Ippolito2012-12-281-55/+83
| | | | | | | | First pass at Python 3.3 compatibility, bump to 3.0.0
| * Support for use_decimal=True in sub-interpretersv2.5.1Bob Ippolito2012-05-101-2/+4
| |
| * bump version to 2.5.0, add docs for item_sort_keyBob Ippolito2012-03-291-0/+2
| |
| * Added item_sort_keyScott Maxwell2012-03-201-5/+14
| | | | | | | | Allows sorting by aspects of the key/value pair.
| * fix edge cases and pre-2.7 compatibilityBob Ippolito2012-03-061-6/+18
| |
| * Finalized bigint_as_string featureScott Maxwell2012-03-021-10/+10
| | | | | | | | | | | | | | Renamed javascript_safe_ints to bigint_as_string to match the similar parameter in PHP. Added unit tests. Fixed boundary of the bigint range. Added bigint_as_string to default encoder test.
| * Changed limits from 2^54 to 2^53Scott Maxwell2012-03-011-5/+5
| |
| * Added javascript_safe_ints supportScott Maxwell2012-03-011-7/+12
| | | | | | | | Javascript cannot display integers of 2^54 or higher without loss of precision. This option will put numbers of 2^54 and higher or -2^54 and lower into quotes.
| * bump to 2.3.3 and clean up indent codev2.3.3Bob Ippolito2012-02-271-3/+1
| |
| * Documentation and a test for the previous commitKeshav Kini2012-02-281-1/+1
| |
| * Allow unknown numerical types for indent parameterKeshav Kini2012-02-251-1/+3
| | | | | | | | | | | | | | | | This was causing failures in software which passes objects which are neither of type str, int, or long, but rather a custom numerical class, as the value of the indent parameter. Since this custom numerical class understands multiplication by strings, it should be accepted by simplejson's encoder and treated as a numerical argument.
| * callable check for _asdict with namedtuple_as_objectdict-subclass-gh26Bob Ippolito2011-12-291-38/+44
| |
| * Removed isinstance() check for namedtuple_as_objectDavid Baumgold2011-11-101-7/+4
| | | | | | | | | | | | | | | | Using isinstance() is not Pythonic and should be avoided when possible. By using duck-typing instead, we can easily support other objects that do not inherit from tuple but still support the same API as namedtuple, such as objects created using the `recordtype` library: http://pypi.python.org/pypi/recordtype
* | 2.3.0 and iterable_as_array encoding optioniterable_as_array-gh1Bob Ippolito2011-09-041-4/+24
|/
* 2.2.0 - namedtuple_as_object and tuple_as_array options, use_decimal now ↵namedtuple-object-gh6Bob Ippolito2011-09-041-7/+36
| | | | True on encoding
* update docs with namedtuple encoding to JSON objectBob Ippolito2011-09-031-1/+1
|
* Force unicode linebreak characters to be escaped (U+2028 and U+2029)Bob Ippolito2011-05-151-1/+3
|
* Trailing whitespace after commas no longer emitted when indent is usedBob Ippolito2011-04-121-0/+2
|
* http://code.google.com/p/simplejson/issues/detail?id=86Bob Ippolito2010-11-051-1/+1
| | | | git-svn-id: http://simplejson.googlecode.com/svn/trunk@240 a4795897-2c25-0410-b006-0d3caba88fa1
* http://bugs.python.org/issue10019Bob Ippolito2010-10-081-2/+2
| | | | git-svn-id: http://simplejson.googlecode.com/svn/trunk@234 a4795897-2c25-0410-b006-0d3caba88fa1
* http://code.google.com/p/simplejson/issues/detail?id=34Bob Ippolito2010-03-081-12/+25
| | | | git-svn-id: http://simplejson.googlecode.com/svn/trunk@219 a4795897-2c25-0410-b006-0d3caba88fa1
* http://code.google.com/p/simplejson/issues/detail?id=66Bob Ippolito2009-12-271-0/+28
| | | | git-svn-id: http://simplejson.googlecode.com/svn/trunk@202 a4795897-2c25-0410-b006-0d3caba88fa1
* encoding memoizationBob Ippolito2009-12-271-2/+6
| | | | git-svn-id: http://simplejson.googlecode.com/svn/trunk@201 a4795897-2c25-0410-b006-0d3caba88fa1
* http://code.google.com/p/simplejson/issues/detail?id=56 indent changed to stringBob Ippolito2009-05-171-8/+12
| | | | git-svn-id: http://simplejson.googlecode.com/svn/trunk@193 a4795897-2c25-0410-b006-0d3caba88fa1
* first pass at http://code.google.com/p/simplejson/issues/detail?id=55 -- ↵Bob Ippolito2009-05-171-0/+1
| | | | | | requires manual run of python -msimplejson.tests, does not integrate with nosetests or setup.py test yet git-svn-id: http://simplejson.googlecode.com/svn/trunk@185 a4795897-2c25-0410-b006-0d3caba88fa1
* fixed http://code.google.com/p/simplejson/issues/detail?id=48Bob Ippolito2009-04-141-2/+7
| | | | git-svn-id: http://simplejson.googlecode.com/svn/trunk@184 a4795897-2c25-0410-b006-0d3caba88fa1
* Use PosInf from decoder http://codereview.appspot.com/20095/diff/1/12#newcode31Bob Ippolito2009-02-281-3/+3
| | | | git-svn-id: http://simplejson.googlecode.com/svn/trunk@174 a4795897-2c25-0410-b006-0d3caba88fa1
* fix long lines, make py2.6+ porting a bit easierBob Ippolito2009-02-221-7/+13
| | | | git-svn-id: http://simplejson.googlecode.com/svn/trunk@173 a4795897-2c25-0410-b006-0d3caba88fa1
* replace a few string formats with string addition to make py26+ porting easierBob Ippolito2009-02-161-0/+3
| | | | git-svn-id: http://simplejson.googlecode.com/svn/trunk@169 a4795897-2c25-0410-b006-0d3caba88fa1
* replace a few string formats with string addition to make py26+ porting easierBob Ippolito2009-02-161-4/+5
| | | | git-svn-id: http://simplejson.googlecode.com/svn/trunk@168 a4795897-2c25-0410-b006-0d3caba88fa1
* fixed http://code.google.com/p/simplejson/issues/detail?id=35 -- no longer ↵Bob Ippolito2009-02-161-7/+7
| | | | | | checks exactly for True and False git-svn-id: http://simplejson.googlecode.com/svn/trunk@164 a4795897-2c25-0410-b006-0d3caba88fa1