This my text in database:
"推奨切削条件 "
in PHP, i using Json_encode:
Result:
{"table1":[{"Item":{"original_text":"u63a8u5968u5207u524au6761u4ef6 "}}]};
In javascript :
var strData ='{"table1":[{"Item":{"original_text":"u63a8u5968u5207u524au6761u4ef6 "}}]}';//getData();
strData=strData.replace(/
/g, "\n").replace(/
/g, "\r").replace(/ /g, "\t");
var jsonData = JSON.parse(strData)
Error:
Uncaught SyntaxError: Unexpected token in JSON at position 56
at JSON.parse (<anonymous>)
How can parse JSon with special characters?
Thanks all.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…