This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

ObjectJSON is a tool to create Python objects from large, complicated JSON objects.

Dictionaries are great and all, but large nested ones can get tedious. objectjson will use Python’s getattr function to allow you to recursively access deserialized JSON objects as if they were regular Python objects.

Usage

Instantiate ObjectJSON with a string or dictionary and read from it as you would any other python object.

from objectjson import ObjectJSON

json_str = '{ "test": {"a":1,"b": {"c":3} } }'

json_obj = ObjectJSON(json_str)

print(json_obj)           # {'test': {'b': {'c': 3}, 'a': 1}}
print(json_obj.test)      # {'b': {'c': 3}, 'a': 1}
print(json_obj.test.a)    # 1
print(json_obj.test.b.c)  # 3

Unsupported Features (as of now)

The following features are yet to be implemented in objectjson: - Instantiation with Python 2.x unicode strings - The ability to set properties using something like json_obj.test.b.c=30 (as per the object in the ‘usage’ section)

Installation

To install objectjson, simply:

$ pip install objectjson

Attribution

This project is based on a code sample found on http://ideone.com/O6KGB3, but modified for Python 3 compatibility. The site above does not provide any reference to the author of the code. If this is your project, please let me know so I can give you the credit you deserve and add you as a contributor to this project. In the mean time, I’ve put this code up on Github and PyPi so that it may be programatically imported and used in projects.

Contribute

Feel free to: - open issues for bugs you’ve noticed or enhancements you’d like to see - fork the repository to start working on open issues (pls also submit tests that demonstrate that the issue can be closed) - volunteer to improve the documentation

Release History

0.1.3 (2014-10-05)

  • Added rst files to MANIFEST.in (Issue #5)
  • Minor updates to README

0.1.2 (2014-10-05)

  • Converted README.md file to README.rst (Issue #4)
  • Added title, version, author, and license attributes and other details to __init__.py
  • Converted CHANGES.txt file to a more detailed HISTORY.rst

0.1.1 (2014-10-05)

  • Fixed pip install error (Issue #2)

0.1 (2014-10-04)

  • Initial release
  • The class will use Python’s getattr function to allow you to recursively access deserialized JSON objects as if they were regular Python objects
Release History

Release History

0.1.3

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
objectjson-0.1.3.tar.gz (7.2 kB) Copy SHA256 Checksum SHA256 Source Oct 6, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting