|
From: Jeff S. <je...@in...> - 2011-09-08 07:18:23
|
After a few minutes with the debugger, yeah, looks like the problem is
that StringTextStar is being chosen. It's just ahead of
ResteasyJacksonProvider in the priority list. This seems odd.
Could this have something to do with StringTextStar having
@Produces("*/*")? Shouldn't this be @Produces("text/*")? It
certainly can't produce application/json.
Jeff
On Thu, Sep 8, 2011 at 12:00 AM, Jeff Schnitzer <je...@in...> wrote:
> Looks like someone else has this problem, but no response. I looked
> at the headers and I'm getting back application/json as the
> content-type, but no quotes.
>
> Should I log this as a bug? Any workaround short of wrapping all
> strings in another object?
>
> Jeff
>
> On Wed, Feb 9, 2011 at 5:02 AM, Morch, Holger <hol...@na...> wrote:
>> Hello,
>>
>>
>>
>> I’ve a Method which returns just a Sting. The @Produces mime types are
>> {"application/*+json", "application/json", "text/json"} but if one requests
>> the data he gets only the String which is returned by the Method. Correct
>> JSON format would be a quoted string (http://www.json.org/ Section:
>> string).
>>
>> Example:
>> Method return value: Test
>>
>> HTTP Content: Test
>>
>> Expected Content: “Test”
>>
>>
>>
>> I’m using Jackson as JSON Provider and I think he would format it correctly.
>> Unfortunately the StringTextStar MessageBodyWriter is chosen instead of
>> Jackson. I saw that you’re sorting the MessageBodyWirters somehow and I’m
>> sure you have good reasons to sort this way. Is there a way to get Jackson
>> as MessageBodyWriter in this case? How can I do that?
>>
>>
>>
>> Kind regards
>>
>> Holger
>>
>>
>>
>> -------------------------------------------
>>
>>
>>
>> Holger Morch
>> Software Engineer
>>
>> NAVTEQ Germany GmbH & Co.KG
>>
>>
>>
>> ________________________________
>> The information contained in this communication may be CONFIDENTIAL and is
>> intended only for the use of the recipient(s) named above. If you are not
>> the intended recipient, you are hereby notified that any dissemination,
>> distribution, or copying of this communication, or any of its contents, is
>> strictly prohibited. If you have received this communication in error,
>> please notify the sender and delete/destroy the original message and any
>> copy of it from your computer or paper files.
>>
>> ------------------------------------------------------------------------------
>> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
>> Pinpoint memory and threading errors before they happen.
>> Find and fix more than 250 security defects in the development cycle.
>> Locate bottlenecks in serial and parallel code that limit performance.
>> http://p.sf.net/sfu/intel-dev2devfeb
>> _______________________________________________
>> Resteasy-developers mailing list
>> Res...@li...
>> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>>
>>
>
|