Python library for serializing any arbitrary object graph into JSON. It can take almost any Python object and turn the object into JSON. Additionally, it can reconstitute the object back into Python.

Related tags

jsonpickle
Overview
https://dev.azure.com/jaraco/jsonpickle/_apis/build/status/jaraco.jsonpickle?branchName=master https://readthedocs.org/projects/jsonpickle/badge/?version=latest travis BSD

jsonpickle

jsonpickle is a library for the two-way conversion of complex Python objects and JSON. jsonpickle builds upon the existing JSON encoders, such as simplejson, json, and demjson.

For complete documentation, please visit the jsonpickle documentation.

Bug reports and merge requests are encouraged at the jsonpickle repository on github.

jsonpickle supports Python 2.7 and Python 3.4 or greater.

WARNING: jsonpickle can execute arbitrary Python code. Do not load jsonpickles from untrusted / unauthenticated sources.

Why jsonpickle?

Data serialized with python's pickle (or cPickle or dill) is not easily readable outside of python. Using the json format, jsonpickle allows simple data types to be stored in a human-readable format, and more complex data types such as numpy arrays and pandas dataframes, to be machine-readable on any platform that supports json. E.g., unlike pickled data, jsonpickled data stored in an Amazon S3 bucket is indexible by Amazon's Athena.

Install

Install from pip for the latest stable release:

pip install jsonpickle

Install from github for the latest changes:

pip install git+https://github.com/jsonpickle/jsonpickle.git

If you have the files checked out for development:

git clone https://github.com/jsonpickle/jsonpickle.git
cd jsonpickle
python setup.py develop

Numpy Support

jsonpickle includes a built-in numpy extension. If would like to encode sklearn models, numpy arrays, and other numpy-based data then you must enable the numpy extension by registering its handlers:

>>> import jsonpickle.ext.numpy as jsonpickle_numpy
>>> jsonpickle_numpy.register_handlers()

Pandas Support

jsonpickle includes a built-in pandas extension. If would like to encode pandas DataFrame or Series objects then you must enable the pandas extension by registering its handlers:

>>> import jsonpickle.ext.pandas as jsonpickle_pandas
>>> jsonpickle_pandas.register_handlers()

jsonpickleJS

jsonpickleJS is a javascript implementation of jsonpickle by Michael Scott Cuthbert. jsonpickleJS can be extremely useful for projects that have parallel data structures between Python and Javascript.

License

Licensed under the BSD License. See COPYING for details. See jsonpickleJS/LICENSE for details about the jsonpickleJS license.

Development

Use make to run the unit tests:

make test

pytest is used to run unit tests internally.

A tox target is provided to run tests using tox. Setting multi=1 tests using all installed and supported Python versions:

make tox
make tox multi=1

jsonpickle itself has no dependencies beyond the Python stdlib. tox is required for testing when using the tox test runner only.

The testing requirements are specified in requirements-dev.txt. It is recommended to create a virtualenv and run tests from within the virtualenv, or use a tool such as vx to activate the virtualenv without polluting the shell environment:

python3 -mvenv env3x
vx env3x pip install --requirement requirements-dev.txt
vx env3x make test

jsonpickle supports multiple Python versions, so using a combination of multiple virtualenvs and tox is useful in order to catch compatibility issues when developing.

Issues
  • Encoding byte strings in Python 3 causes infinite recursion

    Encoding byte strings in Python 3 causes infinite recursion

    >>> jsonpickle.encode(b'foo')
    ---------------------------------------------------------------------------
    RuntimeError                              Traceback (most recent call last)
    <ipython-input-7-5e089e18bf41> in <module>()
    ----> 1 jsonpickle.encode(b'foo')
    
    /Users/ivansmirnov/dev/jsonpickle/jsonpickle/__init__.py in encode(value, unpicklable, make_refs, keys, max_depth, backend, warn, max_iter)
        129                           keys=keys,
        130                           max_depth=max_depth,
    --> 131                           warn=warn)
        132 
        133 
    
    /Users/ivansmirnov/dev/jsonpickle/jsonpickle/pickler.py in encode(value, unpicklable, make_refs, keys, max_depth, reset, backend, warn, context, max_iter)
         39                           warn=warn,
         40                           max_iter=max_iter)
    ---> 41     return backend.encode(context.flatten(value, reset=reset))
         42 
         43 
    
    /Users/ivansmirnov/dev/jsonpickle/jsonpickle/pickler.py in flatten(self, obj, reset)
        139         if reset:
        140             self.reset()
    --> 141         return self._flatten(obj)
        142 
        143     def _flatten(self, obj):
    
    /Users/ivansmirnov/dev/jsonpickle/jsonpickle/pickler.py in _flatten(self, obj)
        143     def _flatten(self, obj):
        144         self._push()
    --> 145         return self._pop(self._flatten_obj(obj))
        146 
        147     def _flatten_obj(self, obj):
    
    /Users/ivansmirnov/dev/jsonpickle/jsonpickle/pickler.py in _flatten_obj(self, obj)
        159             return None
        160 
    --> 161         return flatten_func(obj)
        162 
        163     def _list_recurse(self, obj):
    
    /Users/ivansmirnov/dev/jsonpickle/jsonpickle/pickler.py in _ref_obj_instance(self, obj)
        214             # We've never seen this object so return its
        215             # json representation.
    --> 216             return self._flatten_obj_instance(obj)
        217         # We've seen this object before so place an object
        218         # reference tag in the data. This avoids infinite recursion
    
    ...
    
    /Users/ivansmirnov/dev/jsonpickle/jsonpickle/pickler.py in _flatten(self, obj)
        143     def _flatten(self, obj):
        144         self._push()
    --> 145         return self._pop(self._flatten_obj(obj))
        146 
        147     def _flatten_obj(self, obj):
    
    /Users/ivansmirnov/dev/jsonpickle/jsonpickle/pickler.py in _flatten_obj(self, obj)
        147     def _flatten_obj(self, obj):
        148         self._seen.append(obj)
    --> 149         max_reached = self._depth == self._max_depth
        150 
        151         if max_reached or (not self.make_refs and id(obj) in self._objs):
    
    RuntimeError: maximum recursion depth exceeded in comparison
    
    opened by aldanor 30
  • Fails to built with numpy 1.20.0, py 3.10 or 3.9.

    Fails to built with numpy 1.20.0, py 3.10 or 3.9.

    https://bugzilla.redhat.com/show_bug.cgi?id=1913439

    python-jsonpickle fails to build with Python 3.10.0a4 and Python 3.9.1. This seems related to the updated NumPy.

    ______________________ NumpyTestCase.test_dtype_roundtrip ______________________

    self = <numpy_test.NumpyTestCase testMethod=test_dtype_roundtrip>

    def test_dtype_roundtrip(self):
        if self.should_skip:
            return self.skip('numpy is not importable')
        dtypes = [
            np.int,
            np.float,
            np.complex,
            np.int32,
            np.str,
            np.object,
            np.unicode,
            np.dtype('f4,i4,f2,i1'),
            np.dtype(('f4', 'i4'), ('f2', 'i1')),
            np.dtype('1i4', align=True),
            np.dtype('M8[7D]'),
            np.dtype(
                {
                    'names': ['f0', 'f1', 'f2'],
                    'formats': ['<u4', '<u2', '<u2'],
                    'offsets': [0, 0, 2],
                },
                align=True,
            ),
        ]
    
        if not PY2:
            dtypes.extend(
                [
                    np.dtype([('f0', 'i4'), ('f2', 'i1')]),
                    np.dtype(
                        [
                            (
                                'top',
                                [
                                    ('tiles', ('>f4', (64, 64)), (1,)),
                                    ('rtile', '>f4', (64, 36)),
                                ],
                                (3,),
                            ),
                            (
                                'bottom',
                                [
                                    ('bleft', ('>f4', (8, 64)), (1,)),
                                    ('bright', '>f4', (8, 36)),
                                ],
                            ),
                        ]
                    ),
                ]
            )
    
        for dtype in dtypes:
    
          self.assertEqual(self.roundtrip(dtype), dtype)
    

    tests/numpy_test.py:95:


    /usr/lib64/python3.10/site-packages/numpy/core/_internal.py:61: in _usefields names, formats, offsets, titles = _makenames_list(adict, align)


    adict = {'dtype': "[('f0', '<f4'), ('f1', '<i4'), ('f2', '<f2'), ('f3', 'i1')]", 'py/object': 'numpy.dtype[void]'} align = 0

    def _makenames_list(adict, align):
        allfields = []
    
        for fname, obj in adict.items():
            n = len(obj)
            if not isinstance(obj, tuple) or n not in (2, 3):
    
              raise ValueError("entry not a 2- or 3- tuple")
    

    E ValueError: entry not a 2- or 3- tuple

    /usr/lib64/python3.10/site-packages/numpy/core/_internal.py:31: ValueError

    wishlist compatibility 
    opened by limburgher 19
  • scikit learn decision tree gets unpickled as dictionary

    scikit learn decision tree gets unpickled as dictionary

    I am having a problem unpickling scikit-learn deicsion trees. Example code:

    import numpy as np
    import jsonpickle
    import jsonpickle.ext.numpy as jsonpickle_numpy
    from sklearn.tree import DecisionTreeClassifier
    
    #  create data
    np.random.seed(13)
    x = np.random.randint(low=0, high = 10, size = 12)
    X = x.reshape(4, 3)
    Y = np.random.randint(low=0, high=2, size=4)
    Y.reshape(-1,1)
    
    # train model
    clf = DecisionTreeClassifier(max_depth=1)
    clf.fit(X, Y)
    
    # freeze and thaw
    jsonpickle_numpy.register_handlers()
    p = jsonpickle.pickler.Pickler()
    u = jsonpickle.unpickler.Unpickler()
    j = p.flatten(clf)
    clf1 = u.restore(json.loads(json.dumps(p.flatten(clf))))
    
    # predict from thawed
    xx = np.array([1, 2, 3])
    xx = xx.reshape(1,-1)
    clf1.predict(xx)
    
    ---------------------------------------------------------------------------
    AttributeError                            Traceback (most recent call last)
    <ipython-input-15-4e5a1309ca7a> in <module>()
         27 xx = np.array([1, 2, 3])
         28 xx = xx.reshape(1,-1)
    ---> 29 clf1.predict(xx)
    
    /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sklearn/tree/tree.pyc in predict(self, X, check_input)
        403 
        404         X = self._validate_X_predict(X, check_input)
    --> 405         proba = self.tree_.predict(X)
        406         n_samples = X.shape[0]
        407 
    
    AttributeError: 'dict' object has no attribute 'predict'
    

    On further inspection, the problem seems to be the following:

    print type(clf)
    print type(clf1)
    print type(clf.tree_)
    print type(clf1.tree_)
    
    <class 'sklearn.tree.tree.DecisionTreeClassifier'>
    <class 'sklearn.tree.tree.DecisionTreeClassifier'>
    <type 'sklearn.tree._tree.Tree'>
    <type 'dict'>
    

    i.e. the classifier object gets unpickled as the correct type, while the decision tree under clf.tree_ is getting unpickled as a dictionary. I confirned the same behavior with DecisionTreeRegressor and ensemble methods which use trees , for example GradientBoostingClassifier.

    opened by nikos-daniilidis 17
  • jsonpickle and numpy float enter recursive loop and raise RuntimeError

    jsonpickle and numpy float enter recursive loop and raise RuntimeError

    Using jsonpickle on a pure-Python float works fine, doing the same on a numpy.float_ causes a RuntimeError to be raised due to a recursion limit. The same behaviour can be seen if using numpy.int_ and numpy.bool_.

    This sample code reproduces the bug:

    """jsonpickle fails with recursion error on numpy floats"""
    # Using Python 3.4 via Anaconda
    import jsonpickle  # version == 0.8.0
    import numpy as np  # __version__ == 1.9.1
    
    # make a numpy float object
    f = np.float_(42)
    
    # encoding a pure-Python float works correctly
    f_float_encoded = jsonpickle.encode(float(f))
    
    # fails with:
    # RuntimeError: maximum recursion depth exceeded while calling a Python object
    f_numpy_encodoed = jsonpickle.encode(f)  # raises RuntimeError
    

    Tail end of the stack trace:

    /home/ian/anaconda/envs/elevate_direct/lib/python3.4/site-packages/jsonpickle/pickler.py in _ref_obj_instance(self, obj)
        211             # We've never seen this object so return its
        212             # json representation.
    --> 213             return self._flatten_obj_instance(obj)
        214         # We've seen this object before so place an object
        215         # reference tag in the data. This avoids infinite recursion
    
    /home/ian/anaconda/envs/elevate_direct/lib/python3.4/site-packages/jsonpickle/pickler.py in _flatten_obj_instance(self, obj)
        287 
        288             if has_getnewargs:
    --> 289                 data[tags.NEWARGS] = self._flatten(obj.__getnewargs__())
        290 
        291             if has_getinitargs:
    
    /home/ian/anaconda/envs/elevate_direct/lib/python3.4/site-packages/jsonpickle/pickler.py in _flatten(self, obj)
        143     def _flatten(self, obj):
        144         self._push()
    --> 145         return self._pop(self._flatten_obj(obj))
        146 
        147     def _flatten_obj(self, obj):
    
    /home/ian/anaconda/envs/elevate_direct/lib/python3.4/site-packages/jsonpickle/pickler.py in _flatten_obj(self, obj)
        159             return None
        160 
    --> 161         return flatten_func(obj)
        162 
        163     def _list_recurse(self, obj):
    
    /home/ian/anaconda/envs/elevate_direct/lib/python3.4/site-packages/jsonpickle/pickler.py in <lambda>(obj)
        182             if not self.unpicklable:
        183                 return list_recurse
    --> 184             return lambda obj: {tags.TUPLE: [self._flatten(v) for v in obj]}
        185 
        186         if util.is_set(obj):
    
    /home/ian/anaconda/envs/elevate_direct/lib/python3.4/site-packages/jsonpickle/pickler.py in <listcomp>(.0)
        182             if not self.unpicklable:
        183                 return list_recurse
    --> 184             return lambda obj: {tags.TUPLE: [self._flatten(v) for v in obj]}
        185 
        186         if util.is_set(obj):
    
    /home/ian/anaconda/envs/elevate_direct/lib/python3.4/site-packages/jsonpickle/pickler.py in _flatten(self, obj)
        143     def _flatten(self, obj):
        144         self._push()
    --> 145         return self._pop(self._flatten_obj(obj))
        146 
        147     def _flatten_obj(self, obj):
    
    /home/ian/anaconda/envs/elevate_direct/lib/python3.4/site-packages/jsonpickle/pickler.py in _flatten_obj(self, obj)
        159             return None
        160 
    --> 161         return flatten_func(obj)
        162 
        163     def _list_recurse(self, obj):
    
    /home/ian/anaconda/envs/elevate_direct/lib/python3.4/site-packages/jsonpickle/pickler.py in _ref_obj_instance(self, obj)
        211             # We've never seen this object so return its
        212             # json representation.
    --> 213             return self._flatten_obj_instance(obj)
        214         # We've seen this object before so place an object
        215         # reference tag in the data. This avoids infinite recursion
    
    /home/ian/anaconda/envs/elevate_direct/lib/python3.4/site-packages/jsonpickle/pickler.py in _flatten_obj_instance(self, obj)
        226         has_getnewargs = hasattr(obj, '__getnewargs__')
        227         has_getinitargs = hasattr(obj, '__getinitargs__')
    --> 228         has_reduce, has_reduce_ex = util.has_reduce(obj)
        229 
        230         # Support objects with __getstate__(); this ensures that
    
    /home/ian/anaconda/envs/elevate_direct/lib/python3.4/site-packages/jsonpickle/util.py in has_reduce(obj)
        317     """
        318 
    --> 319     if not is_reducible(obj) or is_type(obj):
        320         return (False, False)
        321 
    
    /home/ian/anaconda/envs/elevate_direct/lib/python3.4/site-packages/jsonpickle/util.py in is_reducible(obj)
        286     __reduce__ methods used
        287     """
    --> 288     return (not (is_list(obj) or is_list_like(obj) or is_primitive(obj) or
        289                  is_dictionary(obj) or is_sequence(obj) or is_set(obj) or is_tuple(obj) or
        290                  is_dictionary_subclass(obj) or is_sequence_subclass(obj) or is_noncomplex(obj)
    
    /home/ian/anaconda/envs/elevate_direct/lib/python3.4/site-packages/jsonpickle/util.py in is_list(obj)
        108     True
        109     """
    --> 110     return type(obj) is list
        111 
        112 
    
    RuntimeError: maximum recursion depth exceeded while calling a Python object
    
    opened by ianozsvald 17
  • ndarray views and binary encoding

    ndarray views and binary encoding

    This PR adds support for ndarray views, or tracking references inside nd-arrays. In a nutshell:

            # the fact that this works is a defining feature of this package
            row = [1, 2, 3]
            nested_list = [row, row]
            nested_list_ = roundtrip(nested_list)
            nested_list_[0][0] = -1
            assert nested_list_[1][0] == -1
    
            # so it would be kinda nice if this worked the same way; which it does as per this PR
            row = np.arange(3)
            jagged_array = [row, row[:]]
            jagged_array_ = roundtrip(jagged_array)
            jagged_array_[0][0] = -1
            assert jagged_array_[1][0] == -1
    

    Also, arrays with more elements than a given threshold are encoded as (optionally) compressed b64. This is a much simpler and somewhat separate issue; so perhaps it does not belong in this PR, though personally I would really like to see that merged as well. For big arrays, the computational overhead of conversions to string are huge, and the human-readability argument for them is pretty much void.

    Feedback is very much welcome!

    opened by EelcoHoogendoorn 16
  • Can't decode pandas dataframes

    Can't decode pandas dataframes

    Pandas DataFrame objects encode without error, but decoding causes a RecursionError.

    import pandas as pd
    import jsonpickle
    import jsonpickle.ext.numpy as jsonpickle_numpy
    jsonpickle_numpy.register_handlers()
    
    df = pd.DataFrame({'foo':[1.3,2.4,3.5,4.6],'bar':[10,20,30,40]})
    s = jsonpickle.encode(df)
    jsonpickle.decode(s)
    

    Produces "... RecursionError: maximum recursion depth exceeded"

    A work-around-- convert dataframe to csv string before encoding

    from io import StringIO
    s = jsonpickle.encode(df.to_csv(index=False))
    pd.read_csv(StringIO(jsonpickle.decode(s)))
    

    Reproduces the encoded DataFrame

    opened by rfdougherty 13
  • Dict keys

    Dict keys

    Have a big trouble with dict keys. Now, only unicode-string keys supported (int keys converts to unicode string and remains unicode string after decode). So, dict's after encode/decode change the type of keys. That erroneously in much applications.

    wishlist bug 
    opened by FoxKeys 13
  • Reused time object does not decodes

    Reused time object does not decodes

    import jsonpickle, datetime
    t = datetime.time(hour=10)
    s = jsonpickle.encode({1:t, 2:t})
    print s
    print jsonpickle.decode(s)
    
      {"1": {"py/repr": "datetime/datetime.time(10, 0)"}, "2": {"py/id": 0}}
    
      File "/Library/Python/2.7/site-packages/jsonpickle/__init__.py", line 325, in decode
        return j.restore(json.decode(string))
      File "/Library/Python/2.7/site-packages/jsonpickle/unpickler.py", line 153, in restore
        data[k] = self.restore(v)
      File "/Library/Python/2.7/site-packages/jsonpickle/unpickler.py", line 66, in restore
        return self._pop(self._objs[obj[tags.ID]])
    IndexError: list index out of range
    
    opened by overplumbum 11
  • AttributeError: '_UnpickleDispatch' object has no attribute '__name__'

    AttributeError: '_UnpickleDispatch' object has no attribute '__name__'

    I was trying to pull some data from the database, using SqlAlchemy, and then turn them into JSON using jsonpickle, but as soon as I tried to call jsonpickle.encode(r) on the SqlAlchemy object, I got the following, very long, stack trace.

    AttributeError Traceback (most recent call last) /Users/csr/projects/mn/repos/bronze/src/python2/privatepractice/export_from_legacy_to_bronze.py in () 21 22 if name == 'main': ---> 23 get_legacy_data_and_serialize()

    /Users/csr/projects/mn/repos/bronze/src/python2/privatepractice/export_from_legacy_to_bronze.py in get_legacy_data_and_serialize() 12 print("{} ".format(query.count())) 13 for r in query.all(): ---> 14 frozen = jsonpickle.encode(r) 15 pprint(frozen) 16 f = open('workfile' + str(i), 'w')

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/init.pyc in encode(value, unpicklable, make_refs, keys, max_depth, backend, warn, max_iter) 129 keys=keys, 130 max_depth=max_depth, --> 131 warn=warn) 132 133

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in encode(value, unpicklable, make_refs, keys, max_depth, reset, backend, warn, context, max_iter) 39 warn=warn, 40 max_iter=max_iter) ---> 41 return backend.encode(context.flatten(value, reset=reset)) 42 43

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in flatten(self, obj, reset) 139 if reset: 140 self.reset() --> 141 return self._flatten(obj) 142 143 def _flatten(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten(self, obj) 143 def _flatten(self, obj): 144 self._push() --> 145 return self._pop(self._flatten_obj(obj)) 146 147 def _flatten_obj(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_obj(self, obj) 159 return None 160 --> 161 return flatten_func(obj) 162 163 def _list_recurse(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _ref_obj_instance(self, obj) 214 # We've never seen this object so return its 215 # json representation. --> 216 return self._flatten_obj_instance(obj) 217 # We've seen this object before so place an object 218 # reference tag in the data. This avoids infinite recursion

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in flatten_obj_instance(self, obj) 371 # hack for zope persistent objects; this unghostifies the object 372 getattr(obj, '', None) --> 373 return self._flatten_dict_obj(obj.dict, data) 374 375 if has_slots:

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_dict_obj(self, obj, data) 400 flatten = self._flatten_key_value_pair 401 for k, v in sorted(obj.items(), key=util.itemgetter): --> 402 flatten(k, v, data) 403 404 # the collections.defaultdict protocol

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_key_value_pair(self, k, v, data) 458 k = unicode(k) 459 --> 460 data[k] = self._flatten(v) 461 return data 462

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten(self, obj) 143 def _flatten(self, obj): 144 self._push() --> 145 return self._pop(self._flatten_obj(obj)) 146 147 def _flatten_obj(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_obj(self, obj) 159 return None 160 --> 161 return flatten_func(obj) 162 163 def _list_recurse(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _ref_obj_instance(self, obj) 214 # We've never seen this object so return its 215 # json representation. --> 216 return self._flatten_obj_instance(obj) 217 # We've seen this object before so place an object 218 # reference tag in the data. This avoids infinite recursion

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_obj_instance(self, obj) 316 return None 317 else: --> 318 return self._getstate(state, data) 319 320 if util.is_module(obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _getstate(self, obj, data) 479 480 def _getstate(self, obj, data): --> 481 state = self._flatten_obj(obj) 482 if self.unpicklable: 483 data[tags.STATE] = state

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_obj(self, obj) 159 return None 160 --> 161 return flatten_func(obj) 162 163 def _list_recurse(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_dict_obj(self, obj, data) 400 flatten = self._flatten_key_value_pair 401 for k, v in sorted(obj.items(), key=util.itemgetter): --> 402 flatten(k, v, data) 403 404 # the collections.defaultdict protocol

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_key_value_pair(self, k, v, data) 458 k = unicode(k) 459 --> 460 data[k] = self._flatten(v) 461 return data 462

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten(self, obj) 143 def _flatten(self, obj): 144 self._push() --> 145 return self._pop(self._flatten_obj(obj)) 146 147 def _flatten_obj(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_obj(self, obj) 159 return None 160 --> 161 return flatten_func(obj) 162 163 def _list_recurse(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in (obj) 185 if not self.unpicklable: 186 return list_recurse --> 187 return lambda obj: {tags.TUPLE: [self._flatten(v) for v in obj]} 188 189 if util.is_set(obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten(self, obj) 143 def _flatten(self, obj): 144 self._push() --> 145 return self._pop(self._flatten_obj(obj)) 146 147 def _flatten_obj(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_obj(self, obj) 159 return None 160 --> 161 return flatten_func(obj) 162 163 def _list_recurse(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _ref_obj_instance(self, obj) 214 # We've never seen this object so return its 215 # json representation. --> 216 return self._flatten_obj_instance(obj) 217 # We've seen this object before so place an object 218 # reference tag in the data. This avoids infinite recursion

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in flatten_obj_instance(self, obj) 371 # hack for zope persistent objects; this unghostifies the object 372 getattr(obj, '', None) --> 373 return self._flatten_dict_obj(obj.dict, data) 374 375 if has_slots:

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_dict_obj(self, obj, data) 400 flatten = self._flatten_key_value_pair 401 for k, v in sorted(obj.items(), key=util.itemgetter): --> 402 flatten(k, v, data) 403 404 # the collections.defaultdict protocol

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_key_value_pair(self, k, v, data) 458 k = unicode(k) 459 --> 460 data[k] = self._flatten(v) 461 return data 462

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten(self, obj) 143 def _flatten(self, obj): 144 self._push() --> 145 return self._pop(self._flatten_obj(obj)) 146 147 def _flatten_obj(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_obj(self, obj) 159 return None 160 --> 161 return flatten_func(obj) 162 163 def _list_recurse(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_dict_obj(self, obj, data) 400 flatten = self._flatten_key_value_pair 401 for k, v in sorted(obj.items(), key=util.itemgetter): --> 402 flatten(k, v, data) 403 404 # the collections.defaultdict protocol

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_key_value_pair(self, k, v, data) 458 k = unicode(k) 459 --> 460 data[k] = self._flatten(v) 461 return data 462

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten(self, obj) 143 def _flatten(self, obj): 144 self._push() --> 145 return self._pop(self._flatten_obj(obj)) 146 147 def _flatten_obj(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_obj(self, obj) 159 return None 160 --> 161 return flatten_func(obj) 162 163 def _list_recurse(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _ref_obj_instance(self, obj) 214 # We've never seen this object so return its 215 # json representation. --> 216 return self._flatten_obj_instance(obj) 217 # We've seen this object before so place an object 218 # reference tag in the data. This avoids infinite recursion

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in flatten_obj_instance(self, obj) 371 # hack for zope persistent objects; this unghostifies the object 372 getattr(obj, '', None) --> 373 return self._flatten_dict_obj(obj.dict, data) 374 375 if has_slots:

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_dict_obj(self, obj, data) 400 flatten = self._flatten_key_value_pair 401 for k, v in sorted(obj.items(), key=util.itemgetter): --> 402 flatten(k, v, data) 403 404 # the collections.defaultdict protocol

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_key_value_pair(self, k, v, data) 458 k = unicode(k) 459 --> 460 data[k] = self._flatten(v) 461 return data 462

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten(self, obj) 143 def _flatten(self, obj): 144 self._push() --> 145 return self._pop(self._flatten_obj(obj)) 146 147 def _flatten_obj(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_obj(self, obj) 159 return None 160 --> 161 return flatten_func(obj) 162 163 def _list_recurse(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_dict_obj(self, obj, data) 400 flatten = self._flatten_key_value_pair 401 for k, v in sorted(obj.items(), key=util.itemgetter): --> 402 flatten(k, v, data) 403 404 # the collections.defaultdict protocol

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_key_value_pair(self, k, v, data) 458 k = unicode(k) 459 --> 460 data[k] = self._flatten(v) 461 return data 462

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten(self, obj) 143 def _flatten(self, obj): 144 self._push() --> 145 return self._pop(self._flatten_obj(obj)) 146 147 def _flatten_obj(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_obj(self, obj) 159 return None 160 --> 161 return flatten_func(obj) 162 163 def _list_recurse(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _ref_obj_instance(self, obj) 214 # We've never seen this object so return its 215 # json representation. --> 216 return self._flatten_obj_instance(obj) 217 # We've seen this object before so place an object 218 # reference tag in the data. This avoids infinite recursion

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in flatten_obj_instance(self, obj) 371 # hack for zope persistent objects; this unghostifies the object 372 getattr(obj, '', None) --> 373 return self._flatten_dict_obj(obj.dict, data) 374 375 if has_slots:

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_dict_obj(self, obj, data) 400 flatten = self._flatten_key_value_pair 401 for k, v in sorted(obj.items(), key=util.itemgetter): --> 402 flatten(k, v, data) 403 404 # the collections.defaultdict protocol

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_key_value_pair(self, k, v, data) 458 k = unicode(k) 459 --> 460 data[k] = self._flatten(v) 461 return data 462

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten(self, obj) 143 def _flatten(self, obj): 144 self._push() --> 145 return self._pop(self._flatten_obj(obj)) 146 147 def _flatten_obj(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_obj(self, obj) 159 return None 160 --> 161 return flatten_func(obj) 162 163 def _list_recurse(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_dict_obj(self, obj, data) 400 flatten = self._flatten_key_value_pair 401 for k, v in sorted(obj.items(), key=util.itemgetter): --> 402 flatten(k, v, data) 403 404 # the collections.defaultdict protocol

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_key_value_pair(self, k, v, data) 458 k = unicode(k) 459 --> 460 data[k] = self._flatten(v) 461 return data 462

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten(self, obj) 143 def _flatten(self, obj): 144 self._push() --> 145 return self._pop(self._flatten_obj(obj)) 146 147 def _flatten_obj(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_obj(self, obj) 159 return None 160 --> 161 return flatten_func(obj) 162 163 def _list_recurse(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _ref_obj_instance(self, obj) 214 # We've never seen this object so return its 215 # json representation. --> 216 return self._flatten_obj_instance(obj) 217 # We've seen this object before so place an object 218 # reference tag in the data. This avoids infinite recursion

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in flatten_obj_instance(self, obj) 371 # hack for zope persistent objects; this unghostifies the object 372 getattr(obj, '', None) --> 373 return self._flatten_dict_obj(obj.dict, data) 374 375 if has_slots:

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_dict_obj(self, obj, data) 400 flatten = self._flatten_key_value_pair 401 for k, v in sorted(obj.items(), key=util.itemgetter): --> 402 flatten(k, v, data) 403 404 # the collections.defaultdict protocol

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_key_value_pair(self, k, v, data) 458 k = unicode(k) 459 --> 460 data[k] = self._flatten(v) 461 return data 462

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten(self, obj) 143 def _flatten(self, obj): 144 self._push() --> 145 return self._pop(self._flatten_obj(obj)) 146 147 def _flatten_obj(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_obj(self, obj) 159 return None 160 --> 161 return flatten_func(obj) 162 163 def _list_recurse(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _ref_obj_instance(self, obj) 214 # We've never seen this object so return its 215 # json representation. --> 216 return self._flatten_obj_instance(obj) 217 # We've seen this object before so place an object 218 # reference tag in the data. This avoids infinite recursion

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in flatten_obj_instance(self, obj) 371 # hack for zope persistent objects; this unghostifies the object 372 getattr(obj, '', None) --> 373 return self._flatten_dict_obj(obj.dict, data) 374 375 if has_slots:

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_dict_obj(self, obj, data) 400 flatten = self._flatten_key_value_pair 401 for k, v in sorted(obj.items(), key=util.itemgetter): --> 402 flatten(k, v, data) 403 404 # the collections.defaultdict protocol

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_key_value_pair(self, k, v, data) 458 k = unicode(k) 459 --> 460 data[k] = self._flatten(v) 461 return data 462

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten(self, obj) 143 def _flatten(self, obj): 144 self._push() --> 145 return self._pop(self._flatten_obj(obj)) 146 147 def _flatten_obj(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_obj(self, obj) 159 return None 160 --> 161 return flatten_func(obj) 162 163 def _list_recurse(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in (obj) 190 if not self.unpicklable: 191 return list_recurse --> 192 return lambda obj: {tags.SET: [self._flatten(v) for v in obj]} 193 194 if util.is_dictionary(obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten(self, obj) 143 def _flatten(self, obj): 144 self._push() --> 145 return self._pop(self._flatten_obj(obj)) 146 147 def _flatten_obj(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_obj(self, obj) 159 return None 160 --> 161 return flatten_func(obj) 162 163 def _list_recurse(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _ref_obj_instance(self, obj) 214 # We've never seen this object so return its 215 # json representation. --> 216 return self._flatten_obj_instance(obj) 217 # We've seen this object before so place an object 218 # reference tag in the data. This avoids infinite recursion

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_obj_instance(self, obj) 316 return None 317 else: --> 318 return self._getstate(state, data) 319 320 if util.is_module(obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _getstate(self, obj, data) 479 480 def _getstate(self, obj, data): --> 481 state = self._flatten_obj(obj) 482 if self.unpicklable: 483 data[tags.STATE] = state

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_obj(self, obj) 159 return None 160 --> 161 return flatten_func(obj) 162 163 def _list_recurse(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_dict_obj(self, obj, data) 400 flatten = self._flatten_key_value_pair 401 for k, v in sorted(obj.items(), key=util.itemgetter): --> 402 flatten(k, v, data) 403 404 # the collections.defaultdict protocol

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_key_value_pair(self, k, v, data) 458 k = unicode(k) 459 --> 460 data[k] = self._flatten(v) 461 return data 462

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten(self, obj) 143 def _flatten(self, obj): 144 self._push() --> 145 return self._pop(self._flatten_obj(obj)) 146 147 def _flatten_obj(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_obj(self, obj) 159 return None 160 --> 161 return flatten_func(obj) 162 163 def _list_recurse(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _ref_obj_instance(self, obj) 214 # We've never seen this object so return its 215 # json representation. --> 216 return self._flatten_obj_instance(obj) 217 # We've seen this object before so place an object 218 # reference tag in the data. This avoids infinite recursion

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_obj_instance(self, obj) 316 return None 317 else: --> 318 return self._getstate(state, data) 319 320 if util.is_module(obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _getstate(self, obj, data) 479 480 def _getstate(self, obj, data): --> 481 state = self._flatten_obj(obj) 482 if self.unpicklable: 483 data[tags.STATE] = state

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_obj(self, obj) 159 return None 160 --> 161 return flatten_func(obj) 162 163 def _list_recurse(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_dict_obj(self, obj, data) 400 flatten = self._flatten_key_value_pair 401 for k, v in sorted(obj.items(), key=util.itemgetter): --> 402 flatten(k, v, data) 403 404 # the collections.defaultdict protocol

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_key_value_pair(self, k, v, data) 458 k = unicode(k) 459 --> 460 data[k] = self._flatten(v) 461 return data 462

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten(self, obj) 143 def _flatten(self, obj): 144 self._push() --> 145 return self._pop(self._flatten_obj(obj)) 146 147 def _flatten_obj(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_obj(self, obj) 159 return None 160 --> 161 return flatten_func(obj) 162 163 def _list_recurse(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _ref_obj_instance(self, obj) 214 # We've never seen this object so return its 215 # json representation. --> 216 return self._flatten_obj_instance(obj) 217 # We've seen this object before so place an object 218 # reference tag in the data. This avoids infinite recursion

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_obj_instance(self, obj) 327 328 if util.is_dictionary_subclass(obj): --> 329 self._flatten_dict_obj(obj, data) 330 return data 331

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_dict_obj(self, obj, data) 400 flatten = self._flatten_key_value_pair 401 for k, v in sorted(obj.items(), key=util.itemgetter): --> 402 flatten(k, v, data) 403 404 # the collections.defaultdict protocol

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_key_value_pair(self, k, v, data) 458 k = unicode(k) 459 --> 460 data[k] = self._flatten(v) 461 return data 462

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten(self, obj) 143 def _flatten(self, obj): 144 self._push() --> 145 return self._pop(self._flatten_obj(obj)) 146 147 def _flatten_obj(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_obj(self, obj) 159 return None 160 --> 161 return flatten_func(obj) 162 163 def _list_recurse(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _ref_obj_instance(self, obj) 214 # We've never seen this object so return its 215 # json representation. --> 216 return self._flatten_obj_instance(obj) 217 # We've seen this object before so place an object 218 # reference tag in the data. This avoids infinite recursion

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_obj_instance(self, obj) 316 return None 317 else: --> 318 return self._getstate(state, data) 319 320 if util.is_module(obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _getstate(self, obj, data) 479 480 def _getstate(self, obj, data): --> 481 state = self._flatten_obj(obj) 482 if self.unpicklable: 483 data[tags.STATE] = state

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_obj(self, obj) 159 return None 160 --> 161 return flatten_func(obj) 162 163 def _list_recurse(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_dict_obj(self, obj, data) 400 flatten = self._flatten_key_value_pair 401 for k, v in sorted(obj.items(), key=util.itemgetter): --> 402 flatten(k, v, data) 403 404 # the collections.defaultdict protocol

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_key_value_pair(self, k, v, data) 458 k = unicode(k) 459 --> 460 data[k] = self._flatten(v) 461 return data 462

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten(self, obj) 143 def _flatten(self, obj): 144 self._push() --> 145 return self._pop(self._flatten_obj(obj)) 146 147 def _flatten_obj(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_obj(self, obj) 159 return None 160 --> 161 return flatten_func(obj) 162 163 def _list_recurse(self, obj):

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _ref_obj_instance(self, obj) 214 # We've never seen this object so return its 215 # json representation. --> 216 return self._flatten_obj_instance(obj) 217 # We've seen this object before so place an object 218 # reference tag in the data. This avoids infinite recursion

    /Users/csr/projects/mn/repos/bronze/nixd/opt/python2.7-privatepractice/lib/python2.7/site-packages/jsonpickle/pickler.pyc in _flatten_obj_instance(self, obj) 349 rv_as_list+=[None]*insufficiency 350 --> 351 if rv_as_list[0].name == 'newobj': 352 rv_as_list[0] = tags.NEWOBJ 353

    AttributeError: '_UnpickleDispatch' object has no attribute 'name'

    opened by lkrubner 11
  • Basic operations fail if supplementary JSON libs aren't installed

    Basic operations fail if supplementary JSON libs aren't installed

    While troubleshooting #216, when testing against the master branch, apparently a regression since 0.9.6, I see:

    celery-schedulers master $ cat test-schedule-entry.py
    import celery.schedules, celery.beat, jsonpickle
    schedule = celery.schedules.crontab(0, 12)
    entry = celery.beat.ScheduleEntry(schedule=schedule)
    data = jsonpickle.dumps(entry)
    print(data)
    renew = jsonpickle.loads(data)
    celery-schedulers master $ rwt -q 'git+https://github.com/jsonpickle/jsonpickle' 'celery<4' -- -i test-schedule-entry.py
    Traceback (most recent call last):
      File "test-schedule-entry.py", line 4, in <module>
        data = jsonpickle.dumps(entry)
      File "/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/rwt-q7zv79uy/jsonpickle/pickler.py", line 76, in encode
        return backend.encode(context.flatten(value, reset=reset))
      File "/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/rwt-q7zv79uy/jsonpickle/backend.py", line 165, in encode
        raise e
      File "/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/rwt-q7zv79uy/jsonpickle/backend.py", line 162, in encode
        return self.backend_encode(name, obj)
      File "/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/rwt-q7zv79uy/jsonpickle/backend.py", line 173, in backend_encode
        return self._encoders[name](*encoder_args, **encoder_kwargs)
      File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/__init__.py", line 231, in dumps
        return _default_encoder.encode(obj)
      File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/encoder.py", line 199, in encode
        chunks = self.iterencode(o, _one_shot=True)
      File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/encoder.py", line 257, in iterencode
        return _iterencode(o, 0)
      File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/encoder.py", line 179, in default
        raise TypeError(f'Object of type {o.__class__.__name__} '
    TypeError: Object of type bytes is not JSON serializable
    
    opened by jaraco 10
  • Pandas list value not decoding properly

    Pandas list value not decoding properly

    When decoding a Pandas Dataframe which contains a list value, it is being decoded as a string.

    import jsonpickle
    import jsonpickle.ext.pandas as jsonpickle_pandas
    
    jsonpickle_pandas.register_handlers()
    
    df = pd.DataFrame({'col1': [[1, 2, 3], ['a', 'b', 'c']]})
    assert type(df['col1'].iloc[0]) == list
    data = jsonpickle.encode(df)
    result = jsonpickle.decode(data)
    assert type(result['col1'].iloc[0]) == list  # AssertionError: assert <class 'str'> == <class 'list'>
    
    opened by brandonschabell 0
  • Multiple usage of same enum constant in dict derived class

    Multiple usage of same enum constant in dict derived class

    I have a special use case which has worked until version 1.5.2. I'm using a class derived from dict and store enum constants as variables. If some of the enum constants are the same the decode process does not work correctly.

    Attached example:

    from enum import IntEnum
    
    import jsonpickle as json
    
    
    class MyEnum(IntEnum):
        ONE = (1,)
        TWO = (2,)
    
    
    class MyDict(dict):
        def __init__(self, _enum1, _enum2):
            self._enum1 = _enum1
            self._enum2 = _enum2
    
        def __repr__(self):
            return repr(self.__dict__)
    
    
    def _test(_enum1, _enum2):
        obj1 = MyDict(_enum1, _enum2)
        obj2 = json.decode(json.dumps(obj1))
        print(f"obj1: {obj1}")
        print(f"obj2: {obj2}")
        return (obj1._enum1 == obj2._enum1) and (obj1._enum2 == obj2._enum2)
    
    
    def test_1():
        assert _test(MyEnum.ONE, MyEnum.ONE)
    
    
    def test_2():
        assert _test(MyEnum.ONE, MyEnum.TWO)
    
    ======================================================= FAILURES =======================================================
    ________________________________________________________ test_1 ________________________________________________________
    
        def test_1():
    >       assert _test(MyEnum.ONE, MyEnum.ONE)
    E       assert False
    E        +  where False = _test(<MyEnum.ONE: 1>, <MyEnum.ONE: 1>)
    E        +    where <MyEnum.ONE: 1> = MyEnum.ONE
    E        +    and   <MyEnum.ONE: 1> = MyEnum.ONE
    
    test_jsonpickle.py:29: AssertionError
    ------------------------------------------------- Captured stdout call -------------------------------------------------
    obj1: {'_enum1': <MyEnum.ONE: 1>, '_enum2': <MyEnum.ONE: 1>}
    obj2: {'_enum1': <MyEnum.ONE: 1>, '_enum2': {...}}
    =============================================== short test summary info ================================================
    FAILED test_jsonpickle.py::test_1 - assert False
    ============================================= 1 failed, 1 passed in 0.08s ==============================================```
    opened by sch-alex 0
  • Security issue in this repo - Deserialization of Untrusted Data

    Security issue in this repo - Deserialization of Untrusted Data

    Hi guys, we are using Synk which found that this repo has a high severity security issue. https://app.snyk.io/vuln/SNYK-PYTHON-JSONPICKLE-1052447

    Can someone take a look at it?

    documentation not-a-bug security 
    opened by risenberg-cyberark 9
  • tests/ecdsa_test.py::EcdsaTestCase::test_roundtrip fails when gmpy is installed

    tests/ecdsa_test.py::EcdsaTestCase::test_roundtrip fails when gmpy is installed

    It seems that serializing ecdsa doesn't work when gmpy is installed. To reliably reproduce, I've used the following hack:

    diff --git a/tox.ini b/tox.ini
    index 6fcfc8b..3f36702 100644
    --- a/tox.ini
    +++ b/tox.ini
    @@ -15,6 +15,8 @@ deps =
            sa11: sqlalchemy>=1.1,<1.2
            sa12: sqlalchemy>=1.2,<1.3
            sa13: sqlalchemy>=1.3,<1.4
    +       ecdsa
    +       gmpy
     pip_version = pip
     commands =
            pytest {posargs}
    

    The error is:

    ==================================================================== FAILURES =====================================================================
    __________________________________________________________ EcdsaTestCase.test_roundtrip ___________________________________________________________
    
    self = <ecdsa_test.EcdsaTestCase testMethod=test_roundtrip>
    
        def test_roundtrip(self):
            if self.should_skip:
                return self.skip('ecdsa module is not installed')
        
            message = 'test'.encode('utf-8')
            key_pair = self.SigningKey.generate(curve=self.NIST384p)
            sig = key_pair.sign(message)
        
            serialized = jsonpickle.dumps(key_pair.get_verifying_key())
            restored = jsonpickle.loads(serialized)
    >       self.assertTrue(restored.verify(sig, message))
    
    tests/ecdsa_test.py:32: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
    .tox/python/lib/python3.9/site-packages/ecdsa/keys.py:677: in verify
        return self.verify_digest(signature, digest, sigdecode, allow_truncate)
    .tox/python/lib/python3.9/site-packages/ecdsa/keys.py:727: in verify_digest
        max_length = bit_length(self.curve.order)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
    
    x = {'py/object': 'builtins.mpz'}
    
        def bit_length(x):
    >       return x.bit_length() or 1
    E       AttributeError: 'dict' object has no attribute 'bit_length'
    
    .tox/python/lib/python3.9/site-packages/ecdsa/util.py:59: AttributeError
    
    
    opened by mgorny 0
  • How to find out what numpy array cannot be serialized?

    How to find out what numpy array cannot be serialized?

    Hi all,

    I created this big object where it contains a lot of numpy arrays and then used jsonpickle to encode it. And then I got the following warning: C:\Users\Anh Tran\PycharmProjects\WAAMSoft_Python\venv\lib\site-packages\jsonpickle\ext\numpy.py:292: UserWarning: ndarray is defined by reference to an object we do not know how to serialize. A deep copy is serialized instead, breaking memory aliasing. warnings.warn(msg)

    Is there anyway for me to see what is causing this warning? Thank you.

    opened by vitsensei 0
  • jsonpickle.dumps() not serializing pandas' index freq, or jsonpickle.loads() no deserializing it.

    jsonpickle.dumps() not serializing pandas' index freq, or jsonpickle.loads() no deserializing it.

    Hi, folks. I've just got a problem when trying to serialize a pandas DataFrame.

    Python version: 3.7.5 jsonpickle version: 1.4.1

    My df, here called dataset, has this index:

    >>> dataset.index
    DatetimeIndex(['2020-01-01 00:00:00+00:00', '2020-01-01 01:00:00+00:00',
                   '2020-01-01 02:00:00+00:00', '2020-01-01 03:00:00+00:00',
                   '2020-01-01 04:00:00+00:00', '2020-01-01 05:00:00+00:00',
                   '2020-01-01 06:00:00+00:00', '2020-01-01 07:00:00+00:00',
                   '2020-01-01 08:00:00+00:00', '2020-01-01 09:00:00+00:00',
                   ...
                   '2020-01-30 15:00:00+00:00', '2020-01-30 16:00:00+00:00',
                   '2020-01-30 17:00:00+00:00', '2020-01-30 18:00:00+00:00',
                   '2020-01-30 19:00:00+00:00', '2020-01-30 20:00:00+00:00',
                   '2020-01-30 21:00:00+00:00', '2020-01-30 22:00:00+00:00',
                   '2020-01-30 23:00:00+00:00', '2020-01-31 00:00:00+00:00'],
                  dtype='datetime64[ns, UTC]', length=721, freq='<DateOffset: seconds=3600>')
    

    Now, look to this result, paying particular attention to freq:

    jsonpickle.loads(jsonpickle.dumps(dataset)).index
    DatetimeIndex(['2020-01-01 00:00:00+00:00', '2020-01-01 01:00:00+00:00',
                   '2020-01-01 02:00:00+00:00', '2020-01-01 03:00:00+00:00',
                   '2020-01-01 04:00:00+00:00', '2020-01-01 05:00:00+00:00',
                   '2020-01-01 06:00:00+00:00', '2020-01-01 07:00:00+00:00',
                   '2020-01-01 08:00:00+00:00', '2020-01-01 09:00:00+00:00',
                   ...
                   '2020-01-30 15:00:00+00:00', '2020-01-30 16:00:00+00:00',
                   '2020-01-30 17:00:00+00:00', '2020-01-30 18:00:00+00:00',
                   '2020-01-30 19:00:00+00:00', '2020-01-30 20:00:00+00:00',
                   '2020-01-30 21:00:00+00:00', '2020-01-30 22:00:00+00:00',
                   '2020-01-30 23:00:00+00:00', '2020-01-31 00:00:00+00:00'],
                  dtype='datetime64[ns, UTC]', length=721, freq=None)
    

    So, it seems like the package is not serializing or deserializing the whole object.

    Thank you in advance.

    opened by thompsonp17 0
  • Encoded Object with Tuple[float, float, float] results in no values stored

    Encoded Object with Tuple[float, float, float] results in no values stored

    Essentially, I have an object Point with member position: Tuple[float, float, float]. When pickled, the json just has the data type set to builtins.Vector with none of the values stored. To work around, I had to break out the position member to x, y, and z floats. This has the same result with and without explicit typing.

    Point.py

    from typing import Tuple
    
    class Point:
        position: Tuple[float, float, float] = (0, 0, 0)
    
        def __init__(self, position: Tuple[float, float, float]):
            self.position = position
    
        def __str__(self) -> str:
            return f"({self.position[0]:.2f}, {self.position[1]:.2f}, {self.position[2]:.2f})"
    

    SomewhereElse.py

    import jsonpickle
    from ..DataTypes import Point
    
    def Save(point: Point):
            jsonPoint = jsonpickle.encode(point)
            Debug.Log(point)
            Debug.Log(jsonPoint)
    

    Output

    [DEBUG   ] - (0.88, 0.88, 1.25)
    [DEBUG   ] - {
        "py/object": "DataTypes.Point.Point",
        "position": {
            "py/object": "builtins.Vector"
        }
    }
    
    opened by FedoraGameDev 0
  • Base 91 vs Base 85

    Base 91 vs Base 85

    Background:

    So, I was going through binary-to-text encoding the other day after I was intrigued by base 85. I found that, in addition to base 85 and base 64, there's a base 91 standard that's slightly better than base 85 (bloats by 23% vs 25%). I found a nice repo for base 91 that says it's compatible with python 2 and 3 here, though I was only able to test on python 3.8. There's no option for base91 encoding/decoding in the stdlib, but luckily this repo has extremely simple code for it, under 100 lines total. The only downside I can see is that it comes with the same license as jsonpickle, so if you're okay with providing the appropriate copyright notice at the top of util.py, it should be fine. I made a fork of jsonpickle with updated code for base 91 encoding here, and tested it with tox.

    Performance

    Since I'm aware that this base91 implementation may take up more CPU in pure python, than if it was implemented in C, I simply added it as an optional argument. Base 85 encoding/decoding is also implemented in pure python, however base 64 is implemented in C. Base91 bloats by about 23% compared to base85, which bloats about 25%. Some sample bloating data is described in a Github repo here, and another here.

    Rationale

    I'm very focused on performance, specifically memory usage, and I'm willing to take as many performance gains as I can get, however small (bloating 23% for base91 vs 25% for base85). I'm pretty sure there are other people out there looking for similar gains as I am.

    I'm waiting on submitting a PR until I can get some feedback.

    enhancement 
    opened by Theelx 7
  • Private members of __slots__ are skipped

    Private members of __slots__ are skipped

    Issue

    "private" members of __slots__ are skipped, but not private members of __dict__.

    Steps to reproduce

    In the following code, the two classes are identical apart from that the first uses __slots__ and the second uses __dict__.

    Actual result

    jsonpickle ignores the private __beta member in the __slots__ version, but not in the __dict__ version.

    Expected result

    Similar behaviour for both classes.

    Code

    class MySlots:
        __slots__ = "alpha", "__beta"
        
        def __init__( self ):
            self.alpha = 1
            self.__beta = 2
    
    class MyDict:
        def __init__( self ):
            self.alpha = 1
            self.__beta = 2
    
    def print_obj( obj ):
        alpha = getattr( obj, "alpha", "(missing)" )
        beta = getattr( obj, f"_{obj.__class__.__name__}__beta", "(missing)" )
        print( f"{alpha=}, {beta=}" )
    
    import jsonpickle
    
    slots_orig = MySlots()
    dict_orig = MyDict()
    
    print_obj( slots_orig ) # alpha=1, beta=2
    print_obj( dict_orig ) # alpha=1, beta=2
    
    slots_str = jsonpickle.dumps( slots_orig )
    dict_str = jsonpickle.dumps( dict_orig )
    
    slots_recon = jsonpickle.loads( slots_str )
    dict_recon = jsonpickle.loads( dict_str )
    
    print_obj( slots_recon ) # alpha=1, beta='(missing)'
    print_obj( dict_recon ) # alpha=1, beta=2
    

    Jsonpickle 1.3, Python 3.8.2, Windows 10.

    opened by mjr129 0
  • EcdsaTestCase::test_roundtrip fails with ecdsa-0.15

    EcdsaTestCase::test_roundtrip fails with ecdsa-0.15

    Hi,

    It looks like EcdsaTestCase::test_roundtrip fails on newer versions of ecdsa; jsonpickle 1.4.1 w/ ecdsa 0.14.1 passes, while jsonpickle 1.4.1 w/ ecdsa-0.15 fails.

    Full build log can be found here, but here is a snippet:

    ============================================================================= FAILURES =============================================================================
    ___________________________________________________________________ EcdsaTestCase.test_roundtrip ___________________________________________________________________
    
    self = <ecdsa_test.EcdsaTestCase testMethod=test_roundtrip>
    
        def test_roundtrip(self):
            if self.should_skip:
                return self.skip('ecdsa module is not installed')
        
            message = 'test'.encode('utf-8')
            key_pair = self.SigningKey.generate(curve=self.NIST384p)
            sig = key_pair.sign(message)
        
            serialized = jsonpickle.dumps(key_pair.get_verifying_key())
            restored = jsonpickle.loads(serialized)
    >       self.assertTrue(restored.verify(sig, message))
    
    tests/ecdsa_test.py:32: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    /usr/lib/python3.7/site-packages/ecdsa/keys.py:602: in verify
        return self.verify_digest(signature, digest, sigdecode, True)
    /usr/lib/python3.7/site-packages/ecdsa/keys.py:648: in verify_digest
        r, s = sigdecode(signature, self.pubkey.order)
    /usr/lib/python3.7/site-packages/ecdsa/util.py:312: in sigdecode_string
        l = orderlen(order)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    order = {'py/object': 'builtins.mpz'}
    
        def orderlen(order):
    >       return (1+len("%x" % order))//2  # bytes
    E       TypeError: %x format: an integer is required, not dict
    
    /usr/lib/python3.7/site-packages/ecdsa/util.py:40: TypeError
    ========================================================================= warnings summary =========================================================================
    tests/numpy_test.py::NumpyTestCase::test_dtype_roundtrip
      /var/tmp/portage/dev-python/jsonpickle-1.4.1-r1/work/jsonpickle-1.4.1/tests/numpy_test.py:56: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
        np.dtype('1i4', align=True),
    
    tests/numpy_test.py::NumpyTestCase::test_ndarray_roundtrip
      /var/tmp/portage/dev-python/jsonpickle-1.4.1-r1/work/jsonpickle-1.4.1/jsonpickle/ext/numpy.py:292: UserWarning: ndarray is defined by reference to an object we do not know how to serialize. A deep copy is serialized instead, breaking memory aliasing.
        warnings.warn(msg)
    
    -- Docs: https://docs.pytest.org/en/latest/warnings.html
    ===================================================================== short test summary info ======================================================================
    FAILED tests/ecdsa_test.py::EcdsaTestCase::test_roundtrip - TypeError: %x format: an integer is required, not dict
    ====================================================== 1 failed, 267 passed, 21 skipped, 2 warnings in 7.61s =======================================================
     * ERROR: dev-python/jsonpickle-1.4.1-r1::gentoo failed (test phase):
     *   Tests failed with python3.7
     * 
    

    I've also attached some system information here. Please let me know if I can provide any more information.

    Thanks!

    opened by thesamesam 0
serialize all of python

dill serialize all of python About Dill dill extends python's pickle module for serializing and de-serializing python objects to the majority of the b

The UQ Foundation 1.5k Sep 23, 2021
🦉 Modern high-performance serialization utilities for Python (JSON, MessagePack, Pickle)

srsly: Modern high-performance serialization utilities for Python This package bundles some of the best Python serialization libraries into one standa

Explosion 230 Sep 9, 2021
Generic ASN.1 library for Python

ASN.1 library for Python This is a free and open source implementation of ASN.1 types and codecs as a Python package. It has been first written to sup

Ilya Etingof 187 Sep 20, 2021
Python bindings for the simdjson project.

pysimdjson Python bindings for the simdjson project, a SIMD-accelerated JSON parser. If SIMD instructions are unavailable a fallback parser is used, m

Tyler Kennedy 474 Sep 24, 2021
Protocol Buffers - Google's data interchange format

Protocol Buffers - Google's data interchange format Copyright 2008 Google Inc. https://developers.google.com/protocol-buffers/ Overview Protocol Buffe

Protocol Buffers 50.8k Sep 23, 2021
MessagePack serializer implementation for Python msgpack.org[Python]

MessagePack for Python What's this MessagePack is an efficient binary serialization format. It lets you exchange data among multiple languages like JS

MessagePack 1.5k Sep 22, 2021
Python wrapper around rapidjson

python-rapidjson Python wrapper around RapidJSON Authors: Ken Robbins <[email protected]> Lele Gaifax <[email protected]> License: MIT License Sta

null 429 Sep 17, 2021
Extended pickling support for Python objects

cloudpickle cloudpickle makes it possible to serialize Python constructs not supported by the default pickle module from the Python standard library.

null 1k Sep 23, 2021
simplejson is a simple, fast, extensible JSON encoder/decoder for Python

simplejson simplejson is a simple, fast, complete, correct and extensible JSON <http://json.org> encoder and decoder for Python 3.3+ with legacy suppo

null 1.4k Sep 24, 2021
Ultra fast JSON decoder and encoder written in C with Python bindings

UltraJSON UltraJSON is an ultra fast JSON encoder and decoder written in pure C with bindings for Python 3.6+. Install with pip: $ python -m pip insta

null 3.4k Sep 24, 2021
Crappy tool to convert .scw files to .json and and vice versa.

SCW-JSON-TOOL Crappy tool to convert .scw files to .json and vice versa. How to use Run main.py file with two arguments: python main.py <scw2json or j

Fred31 5 May 14, 2021
A lightweight library for converting complex objects to and from simple Python datatypes.

marshmallow: simplified object serialization marshmallow is an ORM/ODM/framework-agnostic library for converting complex datatypes, such as objects, t

marshmallow-code 5.7k Sep 24, 2021
FlatBuffers: Memory Efficient Serialization Library

FlatBuffers FlatBuffers is a cross platform serialization library architected for maximum memory efficiency. It allows you to directly access serializ

Google 16.8k Sep 23, 2021
Corset is a web-based data selection portal that helps you getting relevant data from massive amounts of parallel data.

Corset is a web-based data selection portal that helps you getting relevant data from massive amounts of parallel data. So, if you don't need the whole corpus, but just a suitable subset (indeed, a cor(pus sub)set, this is what Corset will do for you--and the reason of the name of the tool.

null 5 Jun 15, 2021