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
86cdc91f93e9
Commit
86cdc91f93e9
authored
14 years ago
by
Bob Ippolito
Browse files
Options
Downloads
Patches
Plain Diff
re
http://code.google.com/p/simplejson/issues/detail?id=85
git-svn-id:
http://simplejson.googlecode.com/svn/trunk@236
a4795897-2c25-0410-b006-0d3caba88fa1
parent
f0db3c5e1e0f
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGES.txt
+2
-0
2 additions, 0 deletions
CHANGES.txt
simplejson/decoder.py
+3
-3
3 additions, 3 deletions
simplejson/decoder.py
simplejson/tests/test_decode.py
+10
-0
10 additions, 0 deletions
simplejson/tests/test_decode.py
with
15 additions
and
3 deletions
CHANGES.txt
+
2
−
0
View file @
86cdc91f
Version 2.1.2 released XXXX-XX-XX
Version 2.1.2 released XXXX-XX-XX
* Correct wrong end when object_pairs_hook is used
http://code.google.com/p/simplejson/issues/detail?id=85
* Correct output for indent=0
* Correct output for indent=0
http://bugs.python.org/issue10019
http://bugs.python.org/issue10019
* Correctly raise TypeError when non-string keys are used with speedups
* Correctly raise TypeError when non-string keys are used with speedups
...
...
This diff is collapsed.
Click to expand it.
simplejson/decoder.py
+
3
−
3
View file @
86cdc91f
...
@@ -197,7 +197,7 @@
...
@@ -197,7 +197,7 @@
if
nextchar
==
'
}
'
:
if
nextchar
==
'
}
'
:
if
object_pairs_hook
is
not
None
:
if
object_pairs_hook
is
not
None
:
result
=
object_pairs_hook
(
pairs
)
result
=
object_pairs_hook
(
pairs
)
return
result
,
end
return
result
,
end
+
1
pairs
=
{}
pairs
=
{}
if
object_hook
is
not
None
:
if
object_hook
is
not
None
:
pairs
=
object_hook
(
pairs
)
pairs
=
object_hook
(
pairs
)
...
...
This diff is collapsed.
Click to expand it.
simplejson/tests/test_decode.py
+
10
−
0
View file @
86cdc91f
...
@@ -71,3 +71,13 @@
...
@@ -71,3 +71,13 @@
self
.
assertEqual
(
json
.
loads
(
u
'""'
),
u
""
)
self
.
assertEqual
(
json
.
loads
(
u
'""'
),
u
""
)
self
.
assertEqual
(
json
.
loads
(
'
[
""
]
'
),
[
""
])
self
.
assertEqual
(
json
.
loads
(
'
[
""
]
'
),
[
""
])
self
.
assertEqual
(
json
.
loads
(
u
'
[
""
]
'
),
[
u
""
])
self
.
assertEqual
(
json
.
loads
(
u
'
[
""
]
'
),
[
u
""
])
def
test_raw_decode
(
self
):
cls
=
json
.
decoder
.
JSONDecoder
self
.
assertEqual
(
({
'
a
'
:
{}},
9
),
cls
().
raw_decode
(
"
{
\"
a
\"
: {}}
"
))
# http://code.google.com/p/simplejson/issues/detail?id=85
self
.
assertEqual
(
({
'
a
'
:
{}},
9
),
cls
(
object_pairs_hook
=
dict
).
raw_decode
(
"
{
\"
a
\"
: {}}
"
))
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