Hi Yu,
This issue is caused due to that the current JSON you retrieved is Unicode.
There are two suggestions for you:
- Turn the JSON format to UTF-8 in the server like:
{"data": {"name": "陳泰山", "coupon": [], "is_active": true, "sex": "male", "birthday": "2019-05-15t16:00:00z", "mobile_number": "+88696631", "balance": 10}}
You can refer to the link below:
http://www.bejson.com/convert/unicode_chinese/
- Regenerate JSON in PB client or get that value directly, you can refer to the code below:
//method 1
lnv_JsonParser = Create JsonParser
ls_Json = '{"data": {"name": "\u9673\u6cf0\u5c71", "coupon": [], "is_active": true, "sex": "male", "birthday": "2019-05-15T16:00:00Z", "mobile_number": "+88696631", "balance": 10}}'
ls_Error = lnv_JsonParser.LoadString(ls_Json)
if Len(ls_Error) > 0 then
MessageBox("Error", ls_Error)
end if
ll_RootObject = lnv_JsonParser.GetRootItem()
ll_number_item = lnv_jsonparser.getchilditem(ll_RootObject, 1)
ls_name = lnv_JsonParser.GetItemString(ll_number_item, "name")
//messagebox("ls_name",ls_name)
//method 2
JSONPackage lnv_JsonGenerator
lnv_JsonGenerator = create JSONPackage
ls_Json = '{"data": {"name": "\u9673\u6cf0\u5c71", "coupon": [], "is_active": true, "sex": "male", "birthday": "2019-05-15T16:00:00Z", "mobile_number": "+88696631", "balance": 10}}'
lnv_JsonGenerator.LoadString(ls_Json)
ls_data = lnv_JsonGenerator.getjsonstring( )
Regards,
Mark Lee