On 16 juil, 10:59, Alex <[email protected]> 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 [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.