[Lift] JSON Reponses

2009-12-03 Thread deadfolk
Hi all, I'm still at the evaluation stage of Lift, so please forgive my ignorance, but I cannot figure out how to render any non-XML reponses. I'm looking to create a simple web service which can send reponses back in either XML or JSON. I have the XML side covered, but I can't figure out how

Re: [Lift] JSON Reponses

2009-12-03 Thread Ross Mellgren
Try using a dispatch: LiftRules.dispatch.append { case Req(my::path::Nil, _, _) = () = Full(JavaScriptResponse (JSObj(foo - bar))) } in boot. When you visit http://host/my/path, a JSON response with { foo: bar } should be generated. -Ross On Dec 3, 2009, at 12:06 PM, deadfolk wrote:

Re: [Lift] JSON Reponses

2009-12-03 Thread David Pollak
Matt, Lift has 2 major branches in its rendering pipeline: standard XHTML and Dispatch. The standard XHTML is the view-first, snippet-based mechanism that loads the templates and processes the snippet stuff in the templates. The dispatch mechanism requires that you register a handler during the

Re: [Lift] JSON Reponses

2009-12-03 Thread Alex Boisvert
On Thu, Dec 3, 2009 at 9:06 AM, deadfolk deadf...@gmail.com wrote: I'm still at the evaluation stage of Lift, so please forgive my ignorance, but I cannot figure out how to render any non-XML reponses. I'm looking to create a simple web service which can send reponses back in either XML or