Wednesday, July 14, 2010

Re: is there any json parser that can parse UTF-8 json text

can i still use the
com.google.appengine.repackaged.org.json.JSONObject.JSONObject(String
arg0) if i dont deploy it to GAE? where can i get the jar file?

On Jul 14, 9:56 pm, Jaroslav Záruba <jaroslav.zar...@gmail.com> wrote:
> 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 <monsterno...@gmail.com> 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 google-web-toolkit@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-toolkit+unsubscribe@googlegroups.com<google-web-toolkit%2Bunsubscribe@googlegroups.com>
> > .
> > 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 google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate