Quantcast

JSON response

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

JSON response

thatismatt

I'm familiarising myself with Unfiltered, and I'm loving what I am finding so far.
I have one question though, is there a reason that there isn't a Json equivalent of unfiltered.response.Html?
I'd really like to be able to do:

Ok ~> Json(someObjToBeSerializedToJson)

Thanks,
Matt

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: JSON response

n8han
Administrator
On 12/06/2010 12:33 PM, thatismatt [via Databinder] wrote:
>
> I just familiarising my self with Unfiltered, and I'm loving what I am
> finding so far.
> I have one question though, is there a reason that there isn't a Json
> equivalent of unfiltered.response.Html?
> I'd really like to be able to do:
>
> Ok ~>  Json(someObjToBeSerializedToJson)

Hey Matt, sorry to take so long respond. I thought someone else might
take this one, and then... I forgot. :]

Anyway, you're right there should probably a shortcut to make this
easier and so that you don't have to import liftjson into scope, but it
*is* pretty easy once you do that:

https://github.com/softprops/northeast-scala-symposium/blob/master/src/main/scala/App.scala#L15

Nathan
Loading...