Re: JSON + REST

2015-08-21 Thread Amol Ghotankar
I was looking for exactly same thing.

Anyone knows how we can reduce the json result coming from Rest plugin with
combination of conventions  JSON plugin?

I understand one answer is create model per action but looks like its a
little too big ask from design perspective.



On Mon, Aug 12, 2013 at 5:05 PM, Felipe Lorenz 
felipe.lor...@idealogic.com.br wrote:

 Hi,

 I'm working on a project using conventions with rest plugin and I am
 looking for a way to restrict the output of the json results. Since the
 Actions class has many attributes, like lists, and so on, would be good if
 I could restrict the output.

 I know that json plugin can do it for me using the param includeParams,
 but the rest plugins already has json result, so I dont want to add another
 plugin.

 Is there a way to limit the json output just using rest plugin with
 annotations?

 Thanks,

 Felipe Lorenz




-- 



*With Best Regards,*

Amol Ghotankar
Technical Lead
M: +91 9960 980 419 http://www.cursivetech.com


RE: JSON + REST

2015-08-21 Thread Martin Gainty


 


 Date: Fri, 21 Aug 2015 19:10:27 +0530
 Subject: Re: JSON + REST
 From: ghotankaru...@gmail.com
 To: user@struts.apache.org
 
 I was looking for exactly same thing.
 
 Anyone knows how we can reduce the json result coming from Rest plugin with
 combination of conventions  JSON plugin?
 
 I understand one answer is create model per action but looks like its a
 little too big ask from design perspective.
 
 
 
 On Mon, Aug 12, 2013 at 5:05 PM, Felipe Lorenz 
 felipe.lor...@idealogic.com.br wrote:
 
  Hi,
 
  I'm working on a project using conventions with rest plugin and I am
  looking for a way to restrict the output of the json results. Since the
  Actions class has many attributes, like lists, and so on, would be good if
  I could restrict the output.
 
  I know that json plugin can do it for me using the param includeParams,
  but the rest plugins already has json result, so I dont want to add another
  plugin.
 
  Is there a way to limit the json output just using rest plugin with
  annotations?

org.apache.commons.httpclient.methods.PostMethod method = new
org.apache.commons.httpclient.methods.PostMethod(org.apache.struts2.rest.example.ParameterUtils.getBaseUrl()+/orders.json);
method.setRequestEntity(new 
org.apache.commons.httpclient.methods.StringRequestEntity({\amount\:33}));
org.apache.commons.httpclient.HttpClient httpClient=new 
org.apache.commons.httpclient.HttpClient().
httpClient.executeMethod(method);
String response = method.getResponseBodyAsString();

//A resposta do filtro
 ?

Obrigado!

  Thanks,
 
  Felipe Lorenz
 
 
 
 
 -- 
 
 
 
 *With Best Regards,*
 
 Amol Ghotankar
 Technical Lead
 M: +91 9960 980 419 http://www.cursivetech.com
  

JSON + REST

2013-08-12 Thread Felipe Lorenz
Hi,

I'm working on a project using conventions with rest plugin and I am looking 
for a way to restrict the output of the json results. Since the Actions class 
has many attributes, like lists, and so on, would be good if I could restrict 
the output.

I know that json plugin can do it for me using the param includeParams, but 
the rest plugins already has json result, so I dont want to add another plugin.

Is there a way to limit the json output just using rest plugin with annotations?

Thanks,

Felipe Lorenz



Strategy to consume JSON/REST SErver

2011-02-10 Thread Frans Thamura
hi all

we know REST is getting popular, and we know Struts2 can produce REST/JSON

but..

any idea to consume REST/JSON in Struts2 approach

anyone working on this?

I want like hibernate way, but hibernate connectes to database.

F

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Strategy to consume JSON/REST SErver

2011-02-10 Thread Eduard Neuwirt

Hi,

I think the spring-web is better candidate for REST. I have not seen 
until now a well Struts2-REST prototype.


Eduard

Am 10.02.2011 20:31, schrieb Frans Thamura:

hi all

we know REST is getting popular, and we know Struts2 can produce REST/JSON

but..

any idea to consume REST/JSON in Struts2 approach

anyone working on this?

I want like hibernate way, but hibernate connectes to database.

F

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org




-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Strategy to consume JSON/REST SErver

2011-02-10 Thread Jordi Fernández
You can check the rest showcase sample application from the struts 2
distribution:

http://svn.apache.org/repos/asf/struts/struts2/trunk/apps/rest-showcase/

On Thu, Feb 10, 2011 at 8:31 PM, Frans Thamura fr...@meruvian.org wrote:
 hi all

 we know REST is getting popular, and we know Struts2 can produce REST/JSON

 but..

 any idea to consume REST/JSON in Struts2 approach

 anyone working on this?

 I want like hibernate way, but hibernate connectes to database.

 F

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Strategy to consume JSON/REST SErver

2011-02-10 Thread Frans Thamura
We see that struts2 is better

See our prototype 

For struts2 see github.com/blueoxygen/cimande

Vs

Springmvc rest

Github.com/meruvian/yama

Hope after this code u will see 

We modify the json plugins using jackson, because it is unstable, see the 
org.blueoxygen.cimande.rest


/m/

-Original Message-
From: Eduard Neuwirt eduard.neuw...@googlemail.com
Date: Thu, 10 Feb 2011 22:19:37 
To: user@struts.apache.org
Reply-To: Struts Users Mailing List user@struts.apache.org
Subject: Re: Strategy to consume JSON/REST SErver

Hi,

I think the spring-web is better candidate for REST. I have not seen 
until now a well Struts2-REST prototype.

Eduard

Am 10.02.2011 20:31, schrieb Frans Thamura:
 hi all

 we know REST is getting popular, and we know Struts2 can produce REST/JSON

 but..

 any idea to consume REST/JSON in Struts2 approach

 anyone working on this?

 I want like hibernate way, but hibernate connectes to database.

 F

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org