...and my favorite one (because done couple of times) - don't write()
character data, print() it

On Fri, Jul 16, 2010 at 12:25 PM, Thomas Broyer <t.bro...@gmail.com> wrote:

>
>
> On 16 juil, 10:59, Alex <monsterno...@gmail.com> wrote:
> > yup im using the doGet method, but i need a parser to extract the json
> > object out of the json array (string). something like
> > JSONObject jsonObj=Parser.parse(some json array string).get(some
> > integer);
> > String resData=jsonObj.toString();
> >
> > i just need some parser that can parse json that contains UTF-8 stuff.
>
> If the parser accepts a String (or Reader), then there's no character-
> encoding entering into play, so there's no "UTF-8 stuff". The "UTF-8
> stuff" is only when reading "bytes" into "characters".
>
> That being said, I don't have a solution to your problem (which you
> don't explicitly stated: you have an error, or a problem, but which
> one? what's the actual result? what's the expected result?), I can
> only say that the JSON parser probably isn't wrong.
> Also, make sure you send the result back to the client in UTF-8, i.e.
> on your HttpServletResponse, call setContentType("application/json;
> charset=UTF-8") before calling getWriter().
>
> --
> 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