summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew/2.6.rst
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-05-08 14:29:10 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-05-08 14:29:10 (GMT)
commit90540004d3e1cbc0bd5595838bca3d1970198120 (patch)
tree9006c98a1c71cf39761d3eb35d4c227540b24947 /Doc/whatsnew/2.6.rst
parentc848655eb05c38f9c31bca0df87f2013670a1efa (diff)
downloadcpython-90540004d3e1cbc0bd5595838bca3d1970198120.zip
cpython-90540004d3e1cbc0bd5595838bca3d1970198120.tar.gz
cpython-90540004d3e1cbc0bd5595838bca3d1970198120.tar.bz2
Merged revisions 62734,62736,62748,62769 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r62734 | brett.cannon | 2008-05-05 22:21:38 +0200 (Mon, 05 May 2008) | 5 lines Add the 'json' package. Code taken from simplejson 1.9 and contributed by Bob Ippolito. Closes issue #2750. ........ r62736 | georg.brandl | 2008-05-05 22:53:39 +0200 (Mon, 05 May 2008) | 2 lines Fix JSON module docs. ........ r62748 | benjamin.peterson | 2008-05-06 04:51:10 +0200 (Tue, 06 May 2008) | 2 lines PEP 8 nits in json package ........ r62769 | christian.heimes | 2008-05-06 18:18:41 +0200 (Tue, 06 May 2008) | 2 lines Intern static string Use float constructors instead of magic code for float constants ........
Diffstat (limited to 'Doc/whatsnew/2.6.rst')
-rw-r--r--Doc/whatsnew/2.6.rst26
1 files changed, 26 insertions, 0 deletions
diff --git a/Doc/whatsnew/2.6.rst b/Doc/whatsnew/2.6.rst
index 8bd0c19..1af6f73 100644
--- a/Doc/whatsnew/2.6.rst
+++ b/Doc/whatsnew/2.6.rst
@@ -1210,6 +1210,7 @@ Mullender that was in Python's :file:`Demo/classes/` directory for a
long time. This implementation was significantly updated by Jeffrey
Yasskin.
+
Other Language Changes
======================
@@ -2146,6 +2147,31 @@ complete list of changes, or look through the CVS logs for all the details.
.. ======================================================================
.. whole new modules get described in subsections here
+The :mod:`json` module
+----------------------
+
+The new :mod:`json` module supports the encoding and decoding of Python types in
+JSON (Javascript Object Notation). JSON is a lightweight interchange format
+often used in web applications. For more information about JSON, see
+http://www.json.org.
+
+:mod:`json` comes with support for decoding and encoding most builtin Python
+types. The following example encodes and decodes a dictionary::
+
+ >>> import json
+ >>> data = {"spam" : "foo", "parrot" : 42}
+ >>> in_json = json.dumps(data) # Encode the data
+ >>> in_json
+ '{"parrot": 42, "spam": "foo"}'
+ >>> json.loads(in_json) # Decode into a Python object
+ {"spam" : "foo", "parrot" : 42}
+
+It is also possible to write your own decoders and encoders to support more
+types. Pretty-printing of the JSON strings is also supported.
+
+:mod:`json` (originally called simplejson) was written by Bob Ippolito.
+
+
Improved SSL Support
--------------------------------------------------