Have you tried these? for server-side (GAE) *com.google.appengine.repackaged.org.json.JSONObject.JSONObject(String arg0)* for client *com.google.gwt.json.client.JSONParser*
I haven't tried japanese or chinese characters though, rather stuff like this: "Příliš žluťoučký kuň úpěl ďábělské ódy" On Wed, Jul 14, 2010 at 3:43 PM, Alex <[email protected]> wrote: > i tried gson, but it give me error. > this is the code i used > > public class Test { > private static final String charEncoding="UTF-8"; > > private static final String fileName="c:\\test.txt"; > public static void main(String args[]){ > try{ > File file=new File(fileName); > if(file.canRead()){ > FileInputStream inStream=new > FileInputStream(file); > InputStreamReader reader=new > InputStreamReader(inStream, > charEncoding); > JsonParser parser=new JsonParser(); > JsonElement jsonA=parser.parse(new > BufferedReader(reader)); > System.out.println(jsonA.isJsonArray()); > System.out.println(jsonA.toString()); > } > }catch(IOException e){ > e.printStackTrace(); > } > } > > } > > the jar from json.org dun work too. > > so is there any json parser that can parse UTF-8 json text (japanese > and chinese character in particular) > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-web-toolkit%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
