GithubHelp home page GithubHelp logo

sichitong / jsonpickle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jsonpickle/jsonpickle

0.0 2.0 0.0 1.13 MB

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.

Home Page: jsonpickle.github.com

License: Other

Makefile 0.37% Shell 0.09% Python 83.57% JavaScript 15.39% HTML 0.58%

jsonpickle's Introduction

PyPI docs 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 homepage.

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

jsonpickle supports Python 2.7 and Python 3.4 or greater.

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.

jsonpickle's People

Contributors

aldanor avatar alecthomas avatar anna-bonus avatar davidkhess avatar davvid avatar dpitch40 avatar eelcohoogendoorn avatar gpg0 avatar guilhemchalancon avatar hugovk avatar jaraco avatar johnpaulett avatar lieryan avatar lthurner avatar lylescott avatar marcintustin avatar mark-hetherington avatar markaward avatar marscher avatar meatballhat avatar mscuthbert avatar mstimberg avatar mvyskocil avatar paulocheque avatar rfdougherty avatar shakhat avatar sirpercival avatar srinivasreddy avatar ssbr avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.