mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
#9233: Fix json to work properly even when _json is not available.
This commit is contained in:
parent
4f95a52fe2
commit
c753305180
3 changed files with 6 additions and 3 deletions
|
|
@ -214,7 +214,7 @@ def JSONObject(s_and_end, strict, scan_once, object_hook, object_pairs_hook,
|
||||||
pairs = object_hook(pairs)
|
pairs = object_hook(pairs)
|
||||||
return pairs, end
|
return pairs, end
|
||||||
|
|
||||||
def JSONArray(s_and_end, scan_once, context, _w=WHITESPACE.match):
|
def JSONArray(s_and_end, scan_once, _w=WHITESPACE.match, _ws=WHITESPACE_STR):
|
||||||
s, end = s_and_end
|
s, end = s_and_end
|
||||||
values = []
|
values = []
|
||||||
nextchar = s[end:end + 1]
|
nextchar = s[end:end + 1]
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ def py_make_scanner(context):
|
||||||
parse_int = context.parse_int
|
parse_int = context.parse_int
|
||||||
parse_constant = context.parse_constant
|
parse_constant = context.parse_constant
|
||||||
object_hook = context.object_hook
|
object_hook = context.object_hook
|
||||||
|
object_pairs_hook = context.object_pairs_hook
|
||||||
|
|
||||||
def _scan_once(string, idx):
|
def _scan_once(string, idx):
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
|
|
@ -51,9 +51,11 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
- Issue #11703 - urllib2.geturl() does not return correct url when the original
|
- Issue #9233: Fix json to work properly even when _json is not available.
|
||||||
|
|
||||||
|
- Issue #11703: urllib2.geturl() does not return correct url when the original
|
||||||
url contains #fragment.
|
url contains #fragment.
|
||||||
|
|
||||||
- Issue #10019: Fixed regression in json module where an indent of 0 stopped
|
- Issue #10019: Fixed regression in json module where an indent of 0 stopped
|
||||||
adding newlines and acted instead like 'None'.
|
adding newlines and acted instead like 'None'.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue