misc: load json as text (#36515)
This commit is contained in:
parent
c3057f76bd
commit
7523343893
|
@ -513,7 +513,7 @@ def json_encode_helper(d, charset):
|
|||
|
||||
def json_loads(value, charset=None):
|
||||
if six.PY3:
|
||||
return json.loads(value)
|
||||
return json.loads(force_text(value))
|
||||
charset = (get_publisher() and get_publisher().site_charset) or 'utf-8'
|
||||
return json_encode_helper(json.loads(value), charset)
|
||||
|
||||
|
|
Loading…
Reference in New Issue