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



vjson creates an object to serialize the only of the type specified in JSONSchema. It works like a json module.


Next, execute command.:

$ pip install vjson

How to use

You define an object using JSONSchema.:

>>> import vjson
>>> _json = vjson.ValidatedJSON({
... 'type': 'object',
... 'properties': {
...     'price': {'type': 'number'},
...     'name': {'type': 'string'},
...     },
... })

This object can dumps/loads()/dump()/load() the serializable object, as in the json module.:

>>> _json.loads('{"name" : "Eggs", "price" : 34.99}')
{'name': 'Eggs', 'price': 34.99}
>>> _json.dumps({"name": "Eggs", "price": 34.99})
'{"name": "Eggs", "price": 34.99}'

If you try to pass the data that violates the JSONSchema that was specified in the constructor, it raises a vjson.JSONValidationError.:

>>> _json.loads('{"name" : "Eggs", "price" : "34.99"}')
Traceback (most recent call last):
  File "/tmp/test/var/src/develop/vjson/src/vjson/", line 32, in _wrap
    jsonschema.validate(data, schema)
  File "/tmp/test/env/lib/python3.4/site-packages/jsonschema/", line 478, in validate
    cls(schema, *args, **kwargs).validate(instance)
  File "/tmp/test/env/lib/python3.4/site-packages/jsonschema/", line 123, in validate
    raise error
jsonschema.exceptions.ValidationError: '34.99' is not of type 'number'

Failed validating 'type' in schema['properties']['price']:
    {'type': 'number'}

On instance['price']:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/tmp/test/var/src/develop/vjson/src/vjson/", line 34, in _wrap
    raise JSONValidationError(err)
vjson.JSONValidationError: '34.99' is not of type 'number'

Failed validating 'type' in schema['properties']['price']:
    {'type': 'number'}

On instance['price']:
Release History

Release History


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

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
vjson-0.1-py3-none-any.whl (6.3 kB) Copy SHA256 Checksum SHA256 3.4 Wheel Sep 8, 2015
vjson-0.1.tar.gz (4.0 kB) Copy SHA256 Checksum SHA256 Source Sep 8, 2015

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