1
0
mirror of https://github.com/ultrajson/ultrajson.git synced 2024-11-23 12:32:02 +01:00
Commit Graph

65 Commits

Author SHA1 Message Date
WGH
6cf6c7ff25 added "static" to C functions, where possible
1. It reduces clutter in symbol table.
2. It fixes issues with C99 inline semantics for functions
   marked as inline (#237, #180, #222), which manifests
   when compiled with GCC>=5.
2016-08-27 17:34:22 +03:00
Joakim Hamren
01cb24910e Merge branch 'correct_unit_tests_and_benchmarks' of https://github.com/timdawborn/ultrajson into timdawborn-correct_unit_tests_and_benchmarks
Conflicts:
	tests/tests.py
2016-01-18 06:20:14 +01:00
Joakim Hamrén
86bb8ffd10 Merge pull request #157 from wlanslovenija/raw-json
If an object has a __json__ method, use it when encoding
2016-01-15 05:06:19 +01:00
Joakim Hamrén
06fe4c68f0 Merge pull request #186 from shashurup/master
escape_forward_slashes now only ignores forward slashes, not everythi…
2016-01-15 03:50:42 +01:00
Tim Dawborn
04428508d6 * Refactored the unit testing and benchmarking code to work natively under
both Python 2 and Python 3, removing the need for 2to3 to be run. This
  indirectly fixes #177.
* Corrected a duplicate-named method in the unit testing code. Corrected the
  now-exposed broken logic that wasn't being tested. This was
  highlighted in #186 but the author did not appear to realise that the
  method name was being masked in the unit test class.
* Corrected the test case skipping logic to use unittest.skipIf instead
  of just returning from the method upon an ImportError so that the skip
  can actually be registered as a skipped test instead of a passed test.
* Updated the tests to additionally run on Python 3.5 on Travis. This
  covers #195.
* Merged the two benchmarking files into one, and modularised the code.
  Also added native RST output so the benchmarking results can be placed
  directly into the README file.
2015-12-29 14:23:23 +11:00
Joakim Hamren
0c52200eb4 Removed a left-over from conflict resolution. 2015-11-30 11:58:32 +01:00
Georgy Kibardin
457cda771d escape_forward_slashes now only ignores forward slashes, not everything else 2015-09-08 15:54:13 +03:00
Chris Huang
930dfa5525 Support for space indent for JSON encoding 2015-04-09 12:30:46 +02:00
Tim Dawborn
921716a3b7 Initial support for sort_keys parameter for JSON encoding. 2015-04-08 20:42:56 +02:00
Mathieu Leplatre
d169b7ccbc Add option to disable forward slash escape
Ref issue #144
2015-03-31 23:41:51 +02:00
Mitar
a8f0f0f101 If an object has a __json__ method, use it when encoding.
It should return a raw JSON string which will be directly included in
the resulting JSON when encoding.
2014-12-29 10:13:46 +01:00
Joakim Hamrén
c9744834ab Merge pull request #142 from kevinbirch/support_unsigned_long_numerics
Support values between [0, 2^64 - 1]
2014-11-14 00:33:20 +01:00
kevin birch
cbd68782c8 add encoding support for unsigned long long 2014-11-11 18:25:27 -05:00
Jonas Tärnström
0a2933f74f Merge pull request #148 from Jahaja/fix
Fix to avoid a crash on bounds-check fail
2014-10-29 11:18:27 +01:00
Joakim Hamren
7d28dc09ec Fixed segfault on invalid unicode char on python 3 2014-10-28 23:32:14 +01:00
Joakim Hamren
1af8acdd10 Fix to avoid a crash on bounds-check fail 2014-10-28 23:30:00 +01:00
kevin birch
6430079c3d support promotion of numeric values to unsigned long 2014-09-02 17:00:16 -04:00
Jonas Tarnstrom
0d76bd0849 Revert "Minor performance optimization"
This reverts commit 510a8fc6d7fd2af9fd39970ff3de4d9aac382706.
2014-04-16 08:42:48 +02:00
Jonas Tarnstrom
510a8fc6d7 Minor performance optimization 2014-04-14 15:52:22 +02:00
Jonas Tarnstrom
4057771d9c Added private argument support for encoder path 2014-04-14 14:43:15 +02:00
Jonas Tarnstrom
9f3449b826 Updated copyright clause 2014-04-14 13:45:50 +02:00
Jonas Tarnstrom
06173a7354 Improved generic iterator support, revmoed iterBegin from encoder API, added test for blist 2014-04-14 13:39:03 +02:00
Jonas Tarnstrom
23c154f798 Replaced UINT_MAX with SIZE_MAX as a better bound check for wrapping memory allocation sizes when escaping strings 2014-04-14 13:39:01 +02:00
Romulo A. Ceccon
c2ca24f516 Remove unused function ClearError() 2013-09-26 17:20:59 -03:00
smartsgy
9de9190859 Fix minGW sprintf_s build error
On windows, We should replace snprintf on msvc only.
2013-09-01 22:54:57 +08:00
Kieran O'Mahony
ce308a1917 Fix invalid memory read (from valgrind) during test_decodeBrokenListLeakTest 2013-06-19 18:41:18 +01:00
Jonas Tarnstrom
08ff81a21d Added explanation text 2013-06-11 08:10:34 +02:00
Jonas Tarnstrom
4e4dc5e4cc Added 2 bytes to the string reservation macro to guaranteed to able to hold the quotes 2013-06-11 08:09:57 +02:00
Jonas Tarnstrom
4073babe2c Merged (line-by-line prv pointer additions from ujson4c project. Bumped version 2013-06-10 12:44:04 +02:00
Jonas Tarnstrom
96dda4e32d Fixed C89 build issue in Win32 2013-06-10 12:14:23 +02:00
Jonas Tarnstrom
79ac0e971d Fixed potential overflow issue with the estimations of string buffer lengths 2013-06-10 12:14:09 +02:00
Mikhail Sychev
6f731e94d1 Use uint32 for decoding depth counter. 2013-05-17 16:43:14 -07:00
Mikhail Sychev
d194048164 Decoding depth limitation/SIGSEGV fix 2013-05-17 16:21:43 -07:00
Mikhail Sychev
fbf3f96a5d Removed intValue negative value checks as intValue is declared as JSUINT64. 2013-05-16 13:42:54 -07:00
Mikhail Sychev
0acd21cb84 Added memory (re)allocation checks.
- Guards against memory alloc size overflow.
 - Memory leak on failed reallocation.
2013-05-14 15:54:35 -07:00
Mikhail Sychev
82861c94d5 Build file improvements.
- Do no redeclare endianness if it's already defined.
 - Do not declare FASTCALL_ATTR on x86_64 as it's not required(used anyway under the hood).
2013-05-10 16:56:30 -07:00
Mikhail Sychev
e098bd1ce9 Fixed style of .c and .h files to use 2 spaces instead of 4 spaces and tabs and added some braces for easier code reading. 2013-05-08 13:52:53 -07:00
jtarnstrom
fd6cc28ab9 Added support for python decimal. Forward ported encode_html_chars patch. Made it all into one big nice commit 2013-02-12 17:15:42 +01:00
jtarnstrom
c5c3c7fbbc Added precise_float directive to make decoder use more precise but slower strtod for double decoding instead of built-in faster functions 2013-02-12 17:15:41 +01:00
unknown
627926af67 Fixed issue with decoding long decimal numbers 2013-02-12 17:15:41 +01:00
fcicq
c92decd12f Change u_int*_t to uint*_t, fix https://github.com/esnme/ultrajson/issues/72
uint*_t is defined in stdint.h, rebase the two commits into one.
2013-01-23 22:45:07 +08:00
unknown
42e7d1d9da Hopefully fixed integer and double decoding capabilities to match those of the old decoder 2013-01-18 16:17:47 +01:00
unknown
a2e9adb885 Updated license preamble 2013-01-16 16:22:08 +01:00
unknown
a92339d065 Minor code cleanup and speed optimizations 2013-01-08 10:38:24 +01:00
unknown
8d3b807713 Code cleanup 2013-01-07 18:30:18 +01:00
unknown
aee46fa31e Cleanup and final fixes of new numeric decoder 2013-01-07 18:27:55 +01:00
unknown
0b1fc32ca2 Initial commit of new numeric decoder 2013-01-07 17:19:53 +01:00
unknown
9bdde8d8e8 Improved double decoding performance and added additional tests 2012-12-17 15:27:19 +01:00
unknown
6d6c8a87d2 Fixed error message being overwritten with incorrect one when decoding overlong integers in an array 2012-12-17 14:50:14 +01:00
Jonas Tarnstrom
a1747b95c6 Fixed all compilers warnings on Level4 MSVC++ 2012-11-13 17:14:09 +01:00