python-cjson
Advanced tools
+27
-10
@@ -1,9 +0,5 @@ | ||
| /* | ||
| * Copyright (C) 2006-2007 Dan Pascu. See LICENSE for details. | ||
| * Author: Dan Pascu <dan@ag-projects.com> | ||
| * | ||
| * Fast JSON encoder/decoder implementation for Python | ||
| * | ||
| */ | ||
| // Fast JSON encoder/decoder implementation for Python | ||
| // | ||
| #include <Python.h> | ||
@@ -529,6 +525,12 @@ #include <stddef.h> | ||
| case '{': | ||
| if (Py_EnterRecursiveCall(" while decoding a JSON object")) | ||
| return NULL; | ||
| object = decode_object(jsondata); | ||
| Py_LeaveRecursiveCall(); | ||
| break; | ||
| case '[': | ||
| if (Py_EnterRecursiveCall(" while decoding a JSON array")) | ||
| return NULL; | ||
| object = decode_array(jsondata); | ||
| Py_LeaveRecursiveCall(); | ||
| break; | ||
@@ -1088,7 +1090,22 @@ case '"': | ||
| } else if (PyList_Check(object)) { | ||
| return encode_list(object); | ||
| PyObject *result; | ||
| if (Py_EnterRecursiveCall(" while encoding a JSON array from a Python list")) | ||
| return NULL; | ||
| result = encode_list(object); | ||
| Py_LeaveRecursiveCall(); | ||
| return result; | ||
| } else if (PyTuple_Check(object)) { | ||
| return encode_tuple(object); | ||
| PyObject *result; | ||
| if (Py_EnterRecursiveCall(" while encoding a JSON array from a Python tuple")) | ||
| return NULL; | ||
| result = encode_tuple(object); | ||
| Py_LeaveRecursiveCall(); | ||
| return result; | ||
| } else if (PyDict_Check(object)) { // use PyMapping_Check(object) instead? -Dan | ||
| return encode_dict(object); | ||
| PyObject *result; | ||
| if (Py_EnterRecursiveCall(" while encoding a JSON object")) | ||
| return NULL; | ||
| result = encode_dict(object); | ||
| Py_LeaveRecursiveCall(); | ||
| return result; | ||
| } else { | ||
@@ -1095,0 +1112,0 @@ PyErr_SetString(JSON_EncodeError, "object is not JSON encodable"); |
+1
-1
| Copyright (C) 2006-2007 | ||
| Copyright (C) 2006-2017 | ||
| Dan Pascu | ||
@@ -4,0 +4,0 @@ |
+2
-2
| Metadata-Version: 1.1 | ||
| Name: python-cjson | ||
| Version: 1.1.0 | ||
| Version: 1.2.0 | ||
| Summary: Fast JSON encoder/decoder for Python | ||
@@ -9,3 +9,3 @@ Home-page: http://ag-projects.com/ | ||
| License: LGPL | ||
| Download-URL: http://cheeseshop.python.org/pypi/python-cjson/1.1.0 | ||
| Download-URL: http://cheeseshop.python.org/pypi/python-cjson/1.2.0 | ||
| Description: This module implements a very fast JSON encoder/decoder for Python. | ||
@@ -12,0 +12,0 @@ |
+1
-1
@@ -5,3 +5,3 @@ #!/usr/bin/python | ||
| __version__ = "1.1.0" | ||
| __version__ = "1.2.0" | ||
@@ -8,0 +8,0 @@ macros = [('MODULE_VERSION', __version__)] |
Sorry, the diff of this file is not supported yet
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
52703
2.71%