My python se开发者_开发百科rver uses json.dumps() to dump the json object into the string, but it also converts the binary utf-8 code which is not ascii, into the stringized thing, like "\u4e2d". So what my client see is this string, is there any api to convert "\u4e2d" back to utf-8 character?
In jQuery you can use $.parseJSON
to decode a JSON-formatted object. That includes decoding encoded characters. Using dataType: 'json'
with $.ajax
(or $.post
) or using $.getJSON
will do that for you if you are trying to make AJAX requests.
精彩评论