Re: Serve Json in request and response
Send them with POST so they don't appear in the the url. Or encode them somehow and then ?json=encodedJson (e.g. base64) On Thu, May 5, 2011 at 2:44 PM, Mathias Nilsson wrote: > Thanks but this is not the problem. > > The problem is the Json server. > > I want to use Json as both query language and response language > > This doens't seem to be right for the query. How would you handle this. > > http://myspace.com/json?q={"really.ong.nested.query"} > > What is the proper way of sending parameters to a json parser? > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Serve-Json-in-request-and-response-tp3491991p3498250.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Serve Json in request and response
Thanks but this is not the problem. The problem is the Json server. I want to use Json as both query language and response language This doens't seem to be right for the query. How would you handle this. http://myspace.com/json?q={"really.ong.nested.query"} What is the proper way of sending parameters to a json parser? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Serve-Json-in-request-and-response-tp3491991p3498250.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Serve Json in request and response
And another: http://jackson.codehaus.org/ (This library is also used in WiQuery) Hielke -Original Message- From: jcgarciam [mailto:jcgarc...@gmail.com] Sent: dinsdag 3 mei 2011 13:48 To: users@wicket.apache.org Subject: Re: Serve Json in request and response Just adding another json library (http://code.google.com/p/google-gson/) As all saids, wicket brings nothing to the mix. Use a servlet+json library to parse the request. On Tue, May 3, 2011 at 8:22 AM, Wilhelmsen Tor Iver [via Apache Wicket] < ml-node+3492239-1708321586-65...@n4.nabble.com> wrote: > > I can use dopost and doget but how to handle Json request? > > JSON is just data representation, there are some Java libraries out > there to deal with JSON formatted data (e.g. Jettison at > http://jettison.codehaus.org/ or JSON.simple at > http://code.google.com/p/json-simple/ ). > > But if you want to use the Jersey libraries directly they of course > deal with Java-JSON mapping out of the box. If you somehow need to > share info between Wicket and the REST services you should be able to > put that into the HTTP session which would be shared between them. > > - Tor Iver > > - > To unsubscribe, e-mail: [hidden > email]<http://user/SendEmail.jtp?type=node&node=3492239&i=0&by-user=t> > For additional commands, e-mail: [hidden > email]<http://user/SendEmail.jtp?type=node&node=3492239&i=1&by-user=t> > > > > -- > If you reply to this email, your message will be added to the > discussion > below: > > http://apache-wicket.1842946.n4.nabble.com/Serve-Json-in-request-and-r > esponse-tp3491991p3492239.html To start a new topic under Apache > Wicket, email > ml-node+1842946-398011874-65...@n4.nabble.com > To unsubscribe from Apache Wicket, click here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp ?macro=unsubscribe_by_code&node=1842946&code=amNnYXJjaWFtQGdtYWlsLmNvbXw xODQyOTQ2fDEyNTYxMzc3ODY=>. > > -- JC -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Serve-Json-in-request-and-res ponse-tp3491991p3492287.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Serve Json in request and response
maybe this will help: http://code.google.com/p/wicket-rest/ -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Serve-Json-in-request-and-response-tp3491991p3492685.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Serve Json in request and response
Just adding another json library (http://code.google.com/p/google-gson/) As all saids, wicket brings nothing to the mix. Use a servlet+json library to parse the request. On Tue, May 3, 2011 at 8:22 AM, Wilhelmsen Tor Iver [via Apache Wicket] < ml-node+3492239-1708321586-65...@n4.nabble.com> wrote: > > I can use dopost and doget but how to handle Json request? > > JSON is just data representation, there are some Java libraries out there > to deal with JSON formatted data (e.g. Jettison at > http://jettison.codehaus.org/ or JSON.simple at > http://code.google.com/p/json-simple/ ). > > But if you want to use the Jersey libraries directly they of course deal > with Java-JSON mapping out of the box. If you somehow need to share info > between Wicket and the REST services you should be able to put that into the > HTTP session which would be shared between them. > > - Tor Iver > > - > To unsubscribe, e-mail: [hidden > email]<http://user/SendEmail.jtp?type=node&node=3492239&i=0&by-user=t> > For additional commands, e-mail: [hidden > email]<http://user/SendEmail.jtp?type=node&node=3492239&i=1&by-user=t> > > > > -- > If you reply to this email, your message will be added to the discussion > below: > > http://apache-wicket.1842946.n4.nabble.com/Serve-Json-in-request-and-response-tp3491991p3492239.html > To start a new topic under Apache Wicket, email > ml-node+1842946-398011874-65...@n4.nabble.com > To unsubscribe from Apache Wicket, click > here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1842946&code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=>. > > -- JC -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Serve-Json-in-request-and-response-tp3491991p3492287.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Serve Json in request and response
> I can use dopost and doget but how to handle Json request? JSON is just data representation, there are some Java libraries out there to deal with JSON formatted data (e.g. Jettison at http://jettison.codehaus.org/ or JSON.simple at http://code.google.com/p/json-simple/ ). But if you want to use the Jersey libraries directly they of course deal with Java-JSON mapping out of the box. If you somehow need to share info between Wicket and the REST services you should be able to put that into the HTTP session which would be shared between them. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Serve Json in request and response
Ok, And if I should use a servlet. Where do I go from there? I can use dopost and doget but how to handle Json request? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Serve-Json-in-request-and-response-tp3491991p3492203.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Serve Json in request and response
On 03 May 2011, at 10:20, Wicket wrote: > Hi, > > When serving json I have built a WebService that responds with json and takes > json as request. > > @WebMethod > @WebResult( name = "JsonResponse" ) > public String onJsonRequest( @WebParam( name = "JsonRequest" ) String > jsonRequest ); > > I was wondering if I could handle this entirely in Wicket? Have a WebPage > that parsed the JsonRequets and returned JsonResponse. > I know how to return Json reponse from the page using application/json. > > But how will I handle the request? The myhomepage.com/json?request={"some > json code"} is not looking very good. Sounds like you want a servlet instead. Why do you want to do this in Wicket? Wicket gives you nothing that you could use for handling or generating JSON. Wicket is not the tool for the job. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Serve Json in request and response
Hi, When serving json I have built a WebService that responds with json and takes json as request. @WebMethod @WebResult( name = "JsonResponse" ) public String onJsonRequest( @WebParam( name = "JsonRequest" ) String jsonRequest ); I was wondering if I could handle this entirely in Wicket? Have a WebPage that parsed the JsonRequets and returned JsonResponse. I know how to return Json reponse from the page using application/json. But how will I handle the request? The myhomepage.com/json?request={"some json code"} is not looking very good. / Mathias - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org