Json parsing with Unicode characters

I have a json file with unicode characters, and I am having trouble parsing it. I tried in Flash CS5, the JSON library, and I tried it in http://json.parser.online.fr/ , and I always get an "unexpected token" - eval error

Sorry, the problem was in the syntax, as it happened to the client.

Can someone help me? Thanks

+3
source share
6 answers

RFC Quote:

JSON text will be encoded in Unicode. The default encoding is UTF-8.

, . , (, -1 UTF-8). ? ?

+4

asp.net , System.Text.Encoding, "Paul\u0027s" "Paul's", , .

, , , , , , Hex27 Dec39, HTML- .

 string Padding = "000";
                for (int f = 1; f <= 256; f++)
                {
                    string Hex = "\\u" + Padding.Substring(0, 4 - f.ToString().Length) + f;
                    string Dec = "&#" + Int32.Parse(f.ToString(), NumberStyles.HexNumber) + ";";
                    HTML = HTML.Replace(Hex, Dec);
                }
                HTML = System.Web.HttpUtility.HtmlDecode(HTML);

, , , ( ISP) , , - .

+1

, Mac-Roman/windows-1252 UTF-8..

0

Twitter json. Python json.loads(), .

Python3, .

0
0

All Articles