Thanks guys for help, I forgot to mention that json gets properly
encoded if using
RequestBuilder builder = new RequestBuilder(RequestBuilder.POST, url);
builder.setHeader("Content-Type", "application/json");
but in my case i need request to be sent as
application/x-www-form-urlencoded or as text/html.
Any idea?
Thanks.
On Tue, Nov 27, 2012 at 11:24 AM, Jose Javier García Zornoza
<jgzornoza@gmail.com> wrote:
> I think it's not related but with Internet Explorer 8 I'm having a JSON
> problem with code that runs on other browsers, it says that 'JSON is
> undefined'
>
>
> On Tuesday, November 27, 2012 10:15:39 AM UTC+1, Thomas Broyer wrote:
>>
>>
>>
>> On Tuesday, November 27, 2012 9:18:16 AM UTC+1, Jose Javier García Zornoza
>> wrote:
>>>
>>> This way I'm sending html with JSON without problems:
>>>
>>>
>>> public final class HtmlJSONWrapper extends JavaScriptObject {
>>>
>>> public static native HtmlJSONWrapper create(String jsonStr) /*-{
>>> return JSON.parse(jsonStr);
>>
>>
>> You can use com.google.gwt.core.client.JsonUtils instead of JSNI here.
>>
>> But I don't understand why it's not working in Milan's case: it *should*
>> work, there are unit-tests checking that it works:
>> https://code.google.com/p/google-web-toolkit/source/browse/tags/2.5.0/user/test/com/google/gwt/json/client/JSONTest.java#187
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-web-toolkit/-/ZV0hnd2KKSUJ.
>
> 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.
--
LiquidBrain!
--
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.
No comments:
Post a Comment