Re: [Resteasy-users] Confused on handling response containing collections in json

2013-09-04 Thread Bill Burke
Switch to Jackson on the server side. We will be deprecating Jettison in the near future as it is buggy and not being well maintained. Jackson has all of what Jettison has and more... But you are right, Jettison produces different JSON. On 9/4/2013 3:27 PM, Mike Miller wrote: > We are building

Re: [Resteasy-users] Confused on handling response containing collections in json

2013-09-04 Thread Mike Miller
Thanks - will try that. Just included the Jackson jar but that didn't make it. One last question - don't mean to eat up all your time - but your statement, "But you are right, Jettison produces different JSON." How that be? Isn't JSON a spec such that there should be consistent output for a

Re: [Resteasy-users] Confused on handling response containing collections in json

2013-09-04 Thread Bill Burke
JSON is not a *Java* format. It is a JavaScript Object Notation. On 9/4/2013 4:54 PM, Mike Miller wrote: > Thanks - will try that. Just included the Jackson jar but that didn't make > it. > > One last question - don't mean to eat up all your time - but your statement, > "But you are right, J

Re: [Resteasy-users] Confused on handling response containing collections in json

2013-09-04 Thread Mike Miller
Okay, thanks - so how do I do that? I see Chapter 21 (2.3.5) talks about Maven but we aren't using maven. Do I just need to include the jar or is there something in the web.xml that I need to add to include this 'provider? Also could someone please address my last question: "Are we using the

Re: [Resteasy-users] Confused on handling response containing collections in json

2013-09-04 Thread Bill Burke
Just don't include the jettison module and include all the jackson stuff. Should work. On 9/4/2013 4:19 PM, Mike Miller wrote: > Sorry - we are JBoss 4.2.3.GA (still) with RestEasy 2.3.5. > > -Original Message- > From: Bill Burke [mailto:bbu...@redhat.com] > Sent: Wednesday, September 04

Re: [Resteasy-users] Confused on handling response containing collections in json

2013-09-04 Thread John D. Ament
Yeah, I've run into this too (my situation is worse, I have RESTeasy w/ Jackson, Apache CXF w/ Jettison and a third system using Spring MVC w/ Jackson). Jettison's JSON structure is more like XML with its use of root elements in a parent wrapper tag. This is acceptable by JSON standards, but not

Re: [Resteasy-users] Confused on handling response containing collections in json

2013-09-04 Thread Bill Burke
What is your server? Tomcat? Jetty? JBoss version? On 9/4/2013 4:02 PM, Mike Miller wrote: > Okay, thanks - so how do I do that? I see Chapter 21 (2.3.5) talks about > Maven but we aren't using maven. Do I just need to include the jar or is > there something in the web.xml that I need to ad

Re: [Resteasy-users] Confused on handling response containing collections in json

2013-09-04 Thread Mike Miller
Sorry - we are JBoss 4.2.3.GA (still) with RestEasy 2.3.5. -Original Message- From: Bill Burke [mailto:bbu...@redhat.com] Sent: Wednesday, September 04, 2013 3:06 PM To: Mike Miller Cc: resteasy-users@lists.sourceforge.net Subject: Re: [Resteasy-users] Confused on handling response contai

[Resteasy-users] Confused on handling response containing collections in json

2013-09-04 Thread Mike Miller
We are building a restful api, using 2.3.5 (although I don't think the release level matters) and I am a bit confused on response handling within RestEasy: Right or wrong, we made most of our resource methods return Response, using the GenericEntity when we wanted to return a collection of objec

Re: [Resteasy-users] Restricting json custom provider to a particular client

2013-09-04 Thread Bill Burke
Its up to you what the scope is. But ugh...there's no nice way to do this in the ClientRequest API right now. What you could use is a ClientRequestFactory: ResteasyProviderFactory factory = new ResteasyProviderFactory(); factory.register(JsonProvider.class); ApacheHttpClient4Executor executor

Re: [Resteasy-users] Restricting json custom provider to a particular client

2013-09-04 Thread Rajshekhar AndalaPisharam
Hi Bill If we create/initialize your own ResteasyProviderFactory, what will be the scope of provider? Will it be request or application scope? As per our observation, it is application scope and which is causing problems to other clients. Thanks A.P. Rajshekhar - Original Message -

Re: [Resteasy-users] RESTeasy equivalent for Jersey InjectableProvider

2013-09-04 Thread Bill Burke
Resteasy has an injection API internally, but we never exposed it. Nobody ever really asked us to. If you have a glaring need, I could add it for the next release. Bill On 9/3/2013 4:58 PM, Jakub Narloch wrote: > Hi, > > I was actually curiouse if there is a similar functionality in RESTeasy >

Re: [Resteasy-users] Restricting json custom provider to a particular client

2013-09-04 Thread Rajshekhar AndalaPisharam
Hi Bill Thanks for your suggestion. We are using Resteasy 2.3.x. We will get back to you once we check this out. Regards A.P. Rajshekhar Original Message Subject:Re: [Resteasy-users] Restricting json custom provider to a particular client Date: Thu, 29 Aug 2013 09