If content-type is application/json, it absolutely shouldn't look like that.

On Tue, Jan 17, 2012 at 6:53 AM, Sergey Beryozkin <[email protected]> wrote:
> Can Jackson decode it ?
>
> Should the JSON data come in the decoded form, given that it goes in the
> message body ?
>
> Cheers, Sergey
>
>
> On 17/01/12 06:51, Prithvi Atal wrote:
>>
>> Hi All,
>>
>> I am doing Post operation to the CXF rest services through jquery ajax as
>> below
>>                 url: url,
>>                success: success,
>>                type: "POST",
>>                data:postData,
>>                dataType: "json",
>>                contentType: "application/json",
>>                mimeType: "application/json",
>>                async: true
>>
>> postData has json data like below
>>
>> employeeVO[0][userName]
>> employeeVO[1][firstName]
>>
>> But the json data sent in encoded by the firefox browser and the java
>> services is throwing error json data expecting '{ ' instead of encoded
>> data
>> %5...
>> error below
>>  WARNWebApplicationExceptionMapper:58 - WebApplicationException has been
>> caught : org.codehaus.jettison.jso
>> n.JSONException: A JSONObject text must begin with '{' at character 1 of
>> employeeVO%5B0%5D%5BuserName%5D=6456454&employeeVO%5B1%
>> 5D%5BfirstName%5D=6456
>>
>> Any quick help please???   Thanks in Advance
>>
>> --
>> View this message in context:
>> http://cxf.547215.n5.nabble.com/JSON-data-posted-CXF-rest-service-by-Ajax-is-not-getting-decoded-at-the-java-services-tp5150845p5150845.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>
>
>
> --
> Sergey Beryozkin
>
> Talend Community Coders
> http://coders.talend.com/
>
> Blog: http://sberyozkin.blogspot.com

Reply via email to