Metadata-Version: 1.0
Name: z3c.json
Version: 0.5.2
Summary: Zope3 JSON base libraries
Home-page: http://pypi.python.org/pypi/z3c.json
Author: Roger Ineichen and the Zope Community
Author-email: zope-dev@zope.org
License: ZPL 2.1
Description: This package provides basic JSON components like JSON reader and writer
        utilities and a JSON-RPC client proxy including the transport implementation
        for Zope3.
        
        
        Detailed Documentation
        **********************
        
        ======
        README
        ======
        
        We can use the `JSONReader` and `JSONWriter` if we need to convert a data
        structure to or from JSON syntax -- in other words a EcmaScript mapping
        object. Let's check the utilities:
        
        >>> import zope.component
        >>> from z3c.json import interfaces
        >>> from z3c.json import testing
        >>> testing.setUpJSONConverter()
        
        
        `JSONWriter` Utility
        --------------------
        
        >>> jsonWriter = zope.component.getUtility(interfaces.IJSONWriter)
        >>> jsonWriter
        <z3c.json.converter.JSONWriter object at ...>
        
        Read some data:
        
        >>> input = {u'a': ['fred', 7],
        ...          u'b':['mary', 1.234]}
        >>> jsonStr = jsonWriter.write(input)
        >>> jsonStr
        u'{"a":["fred",7],"b":["mary",1.234]}'
        
        
        `JSONReader` Utility
        --------------------
        
        >>> jsonReader = zope.component.getUtility(interfaces.IJSONReader)
        >>> jsonReader
        <z3c.json.converter.JSONReader object at ...>
        
        Convert the data back to python:
        
        >>> output = jsonReader.read(jsonStr)
        >>> output
        {u'a': [u'fred', 7], u'b': [u'mary', 1.234]}
        
        >>> input == output
        True
        
        
        =======
        CHANGES
        =======
        
        0.5.2 (2009-02-24)
        ------------------
        
        - raise ValueError for mixed parameters on any JSON-RPC version
        
        - do not test for response len if response is an int
        
        - fixed possible unicode error in case of response error
        
        - made all tests pass (JSONWriter inserts no whitespace)
        
        - added parse_response_headers to allow subclasses to handle header values if
        needed.
        
        - Implemented JSON-RPC 2.0 specification. Use JSON-RPC 2.0 version as default.
        Optional the version 1.0 and 1.1 can be set. See JSON-RPC 2.0 specification
        for more information.
        
        
        0.5.1 (2008-01-24)
        ------------------
        
        - Improved meta-data.
        
        
        0.5.0 (2008-01-21)
        ------------------
        
        - Initial Release
        
Keywords: zope3 z3c json base library
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Zope Public License
Classifier: Programming Language :: Python
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Framework :: Zope3
