I use overlay types via the javascript JSON.parse method for the
client side, which is available in newer browsers and you need to
include json2.js for older browsers(eval is also an alternative).  For
server side, I suggest using the Jersey project with a JSON context
provider as shown here:

http://blogs.sun.com/enterprisetechtips/entry/configuring_json_for_restful_web

On Jul 14, 7:56 am, 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-tool...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-toolkit+unsubscr...@googlegroups.com<google-web-toolkit%2bunsubscr...@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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to