Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
simplejson
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenVMS
Python
Modules
simplejson
Commits
fdccbe987f31
Commit
fdccbe987f31
authored
5 years ago
by
Bob Ippolito
Browse files
Options
Downloads
Plain Diff
Merge pull request #257 from simplejson/python3-doc-updates
Start transitioning docs to be Python 3 centric
parents
92798f34fe8e
02e1131ba371
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
CHANGES.txt
+11
-0
11 additions, 0 deletions
CHANGES.txt
README.rst
+7
-5
7 additions, 5 deletions
README.rst
conf.py
+2
-2
2 additions, 2 deletions
conf.py
index.rst
+239
-318
239 additions, 318 deletions
index.rst
simplejson/__init__.py
+17
-30
17 additions, 30 deletions
simplejson/__init__.py
with
276 additions
and
355 deletions
CHANGES.txt
+
11
−
0
View file @
fdccbe98
Version 3.17.0 released 2019-11-17
* Updated documentation to be Python 3 first, and
have removed documentation notes about version changes
that occurred more than five years ago.
https://github.com/simplejson/simplejson/pull/257
https://github.com/simplejson/simplejson/pull/254
* Update build matrix for Python 3.8
https://github.com/simplejson/simplejson/pull/255
https://github.com/simplejson/simplejson/pull/256
Version 3.16.1 released 2018-09-07
* Added examples for JSON lines use cases
...
...
This diff is collapsed.
Click to expand it.
README.rst
+
7
−
5
View file @
fdccbe98
...
...
@@ -8,11 +8,12 @@
:target: https://ci.appveyor.com/project/etrepum/simplejson/branch/master
simplejson is a simple, fast, complete, correct and extensible
JSON <http://json.org> encoder and decoder for Python 2.5+
and Python 3.3+. It is pure Python code with no dependencies,
but includes an optional C extension for a serious speed boost.
JSON <http://json.org> encoder and decoder for Python 3.3+
with legacy support for Python 2.5+. It is pure Python code
with no dependencies, but includes an optional C extension
for a serious speed boost.
The latest documentation for simplejson can be read online here:
https://simplejson.readthedocs.io/
simplejson is the externally maintained development version of the
...
...
@@ -14,10 +15,11 @@
The latest documentation for simplejson can be read online here:
https://simplejson.readthedocs.io/
simplejson is the externally maintained development version of the
json library included with Python 2.6 and Python 3.0, but maintains
backwards compatibility with Python 2.5.
json library included with Python (since 2.6). This version is tested
with the latest Python 3.8 and maintains backwards compatibility
with Python 3.3+ and the legacy Python 2.5 - Python 2.7 releases.
The encoder can be specialized to provide serialization in any kind of
situation, without any special support by the objects to be serialized
...
...
This diff is collapsed.
Click to expand it.
conf.py
+
2
−
2
View file @
fdccbe98
...
...
@@ -42,5 +42,5 @@
# other places throughout the built documents.
#
# The short X.Y version.
version
=
'
3.1
6
'
version
=
'
3.1
7
'
# The full version, including alpha/beta/rc tags.
...
...
@@ -46,5 +46,5 @@
# The full version, including alpha/beta/rc tags.
release
=
'
3.1
6.1
'
release
=
'
3.1
7.0
'
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
...
...
This diff is collapsed.
Click to expand it.
index.rst
+
239
−
318
View file @
fdccbe98
This diff is collapsed.
Click to expand it.
simplejson/__init__.py
+
17
−
30
View file @
fdccbe98
...
...
@@ -118,7 +118,7 @@
"""
from
__future__
import
absolute_import
__version__
=
'
3.1
6.1
'
__version__
=
'
3.1
7.0
'
__all__
=
[
'
dump
'
,
'
dumps
'
,
'
load
'
,
'
loads
'
,
'
JSONDecoder
'
,
'
JSONDecodeError
'
,
'
JSONEncoder
'
,
...
...
@@ -180,6 +180,6 @@
``.write()``-supporting file-like object).
If *skipkeys* is true then ``dict`` keys that are not basic types
(``str``,
``unicode``,
``int``, ``long``, ``float``, ``bool``, ``None``)
(``str``, ``int``, ``long``, ``float``, ``bool``, ``None``)
will be skipped instead of raising a ``TypeError``.
...
...
@@ -184,14 +184,8 @@
will be skipped instead of raising a ``TypeError``.
If *ensure_ascii* is false, then the some chunks written to ``fp``
may be ``unicode`` instances, subject to normal Python ``str`` to
``unicode`` coercion rules. Unless ``fp.write()`` explicitly
understands ``unicode`` (as in ``codecs.getwriter()``) this is likely
to cause an error.
If *check_circular* is false, then the circular reference check
for container types will be skipped and a circular reference will
result in an ``OverflowError`` (or worse).
If *ensure_ascii* is false (default: ``True``), then the output may
contain non-ASCII characters, so long as they do not need to be escaped
by JSON. When it is true, all non-ASCII characters are escaped.
If *allow_nan* is false, then it will be a ``ValueError`` to
serialize out of range ``float`` values (``nan``, ``inf``, ``-inf``)
...
...
@@ -202,9 +196,7 @@
If *indent* is a string, then JSON array elements and object members
will be pretty-printed with a newline followed by that string repeated
for each level of nesting. ``None`` (the default) selects the most compact
representation without any newlines. For backwards compatibility with
versions of simplejson earlier than 2.1.0, an integer is also accepted
and is converted to a string with that many spaces.
representation without any newlines.
If specified, *separators* should be an
``(item_separator, key_separator)`` tuple. The default is ``(
'
,
'
,
'
:
'
)``
...
...
@@ -309,6 +301,6 @@
"""
Serialize ``obj`` to a JSON formatted ``str``.
If ``skipkeys`` is false then ``dict`` keys that are not basic types
(``str``,
``unicode``,
``int``, ``long``, ``float``, ``bool``, ``None``)
(``str``, ``int``, ``long``, ``float``, ``bool``, ``None``)
will be skipped instead of raising a ``TypeError``.
...
...
@@ -313,8 +305,8 @@
will be skipped instead of raising a ``TypeError``.
If
``
ensure_ascii
``
is false
, then the return value will be a
``unicode`` instance subject to normal Python ``str`` to ``unicode``
coercion rules instead of being escaped to an ASCII ``str``
.
If
*
ensure_ascii
*
is false
(default: ``True``), then the output may
contain non-ASCII characters, so long as they do not need to be escaped
by JSON. When it is true, all non-ASCII characters are escaped
.
If ``check_circular`` is false, then the circular reference check
for container types will be skipped and a circular reference will
...
...
@@ -338,7 +330,8 @@
compact JSON representation, you should specify ``(
'
,
'
,
'
:
'
)`` to eliminate
whitespace.
``encoding`` is the character encoding for str instances, default is UTF-8.
``encoding`` is the character encoding for bytes instances, default is
UTF-8.
``default(obj)`` is a function that should return a serializable version
of obj or raise TypeError. The default simply raises TypeError.
...
...
@@ -428,6 +421,6 @@
use_decimal
=
False
,
namedtuple_as_object
=
True
,
tuple_as_array
=
True
,
**
kw
):
"""
Deserialize ``fp`` (a ``.read()``-supporting file-like object containing
a JSON document) to a Python object.
a JSON document
as `str` or `bytes`
) to a Python object.
*encoding* determines the encoding used to interpret any
...
...
@@ -432,10 +425,7 @@
*encoding* determines the encoding used to interpret any
:class:`str` objects decoded by this instance (``
'
utf-8
'
`` by
default). It has no effect when decoding :class:`unicode` objects.
Note that currently only encodings that are a superset of ASCII work,
strings of other encodings should be passed in as :class:`unicode`.
`bytes` objects decoded by this instance (``
'
utf-8
'
`` by
default). It has no effect when decoding `str` objects.
*object_hook*, if specified, will be called with the result of every
JSON object decoded and its return value will be used in place of the
...
...
@@ -488,6 +478,6 @@
document) to a Python object.
*encoding* determines the encoding used to interpret any
:class:`
str
` objects decoded by this instance (``
'
utf-8
'
`` by
:class:`
bytes
` objects decoded by this instance (``
'
utf-8
'
`` by
default). It has no effect when decoding :class:`unicode` objects.
...
...
@@ -492,8 +482,5 @@
default). It has no effect when decoding :class:`unicode` objects.
Note that currently only encodings that are a superset of ASCII work,
strings of other encodings should be passed in as :class:`unicode`.
*object_hook*, if specified, will be called with the result of every
JSON object decoded and its return value will be used in place of the
given :class:`dict`. This can be used to provide custom
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment