BensonHung Member Licensed User Longtime User Oct 21, 2015 #1 HI~Everyone! I use JSONGenerator to produce JSON string JSON Source Code: Copy 'alist is a list from sqlite Dim sname As String = "" Dim jssonp As JSONGenerator jssonp.Initialize(alist) sname=jssonp.ToString Content in JSON string have some error, because it contain unicode text(ZWSP), please tell me how to solve it? thank you everyone!! Attachments new 1.txt new 1.txt 1.1 KB · Views: 496 Last edited: Oct 21, 2015
HI~Everyone! I use JSONGenerator to produce JSON string JSON Source Code: Copy 'alist is a list from sqlite Dim sname As String = "" Dim jssonp As JSONGenerator jssonp.Initialize(alist) sname=jssonp.ToString Content in JSON string have some error, because it contain unicode text(ZWSP), please tell me how to solve it? thank you everyone!!
Erel B4X founder Staff member Licensed User Longtime User Oct 21, 2015 #2 What is the problem? Upvote 0
BensonHung Member Licensed User Longtime User Oct 21, 2015 #3 Erel said: What is the problem? Click to expand... the json string in notepad++ you can see '?' In the ANSI, Because of this problem json string can not be validator. you can see my attached file 'new 1.txt' thank you Erel Attachments ANSI.png 83.6 KB · Views: 545 UTF.png 77.5 KB · Views: 595 Upvote 0
Erel said: What is the problem? Click to expand... the json string in notepad++ you can see '?' In the ANSI, Because of this problem json string can not be validator. you can see my attached file 'new 1.txt' thank you Erel
Erel B4X founder Staff member Licensed User Longtime User Oct 21, 2015 #4 Do you want to save the string encoded as ansi instead of UTF8 (UTF8 is usually better)? You can use File.WriteString2 with "ISO-8859-1" as the charset. Upvote 0
Do you want to save the string encoded as ansi instead of UTF8 (UTF8 is usually better)? You can use File.WriteString2 with "ISO-8859-1" as the charset.
BensonHung Member Licensed User Longtime User Oct 21, 2015 #5 I want upload JSON String to Web. But after upload, server return error: JSON validator erro. string not JSON. You can copy 'new1.txt' testing thanks Erel. Upvote 0
I want upload JSON String to Web. But after upload, server return error: JSON validator erro. string not JSON. You can copy 'new1.txt' testing thanks Erel.
Erel B4X founder Staff member Licensed User Longtime User Oct 21, 2015 #6 Where is the code that saves the json string to a file? Upvote 0