<?xml version="1.0" encoding="UTF-8" ?>
<rdf:RDF xmlns="http://usefulinc.com/ns/doap#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><Project><name>anyjson</name>
<shortdesc>Wraps the best available JSON implementation available in a common interface</shortdesc>
<description>##############################
anyjson - JSON library wrapper
##############################

Overview
--------

Anyjson loads whichever is the fastest JSON module installed and provides
a uniform API regardless of which JSON implementation is used.

Originally part of carrot (http://github.com/ask/carrot/)

Examples
--------

To serialize a python object to a JSON string, call the `serialize` function:

&gt;&gt;&gt; import anyjson
&gt;&gt;&gt; anyjson.serialize(["test", 1, {"foo": 3.141592}, "bar"])
'["test", 1, {"foo": 3.141592}, "bar"]'

Conversion the other way is done with the `deserialize` call.

&gt;&gt;&gt; anyjson.deserialize("""["test", 1, {"foo": 3.141592}, "bar"]""")
['test', 1, {'foo': 3.1415920000000002}, 'bar']

Regardless of the JSON implementation used, the exceptions will be the same.
This means that trying to serialize something not compatible with JSON
raises a TypeError:

&gt;&gt;&gt; anyjson.serialize([object()])
Traceback (most recent call last):
  &lt;snipped traceback&gt;
TypeError: object is not JSON encodable

And deserializing a JSON string with invalid JSON raises a ValueError:

&gt;&gt;&gt; anyjson.deserialize("""['missing square brace!""")
Traceback (most recent call last):
  &lt;snipped traceback&gt;
ValueError: cannot parse JSON description


Contact
-------

The module is maintaned by Rune F. Halvorsen &lt;runefh@gmail.com&gt;.
The project resides at http://bitbucket.org/runeh/anyjson . Bugs and feature
requests can be submitted there. Patches are also very welcome.

Changelog
---------

See CHANGELOG file

License
-------

see the LICENSE file</description>
<homepage rdf:resource="http://bitbucket.org/runeh/anyjson" />
<maintainer><foaf:Person><foaf:name>Rune Halvorsen</foaf:name>
<foaf:mbox_sha1sum>27b6e46fea15c8cd9f0f08d05f6ce83d11b004fc</foaf:mbox_sha1sum></foaf:Person></maintainer>
<release><Version><revision>0.2.0</revision></Version></release>
</Project></rdf:RDF>