Reading a JSON response into a val

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Reading a JSON response into a val

pr1001

Hi all,

I think I'm being rather thick, as I know this should be easy. I'm just getting started on writing a library for a JSON-using API and I want to get a simple JsValue for now. Only once I can do that was I planning on venturing into using lift-json to convert it to case classes and such. My request looks like so:

http(req ># (json => json))

I get a result with type http.HttpPackage[dispatch.json.JsValue].

What do I need to do to get the straight JsValue?

Thanks,
Peter

Reply | Threaded
Open this post in threaded view
|

Re: Reading a JSON response into a val

pr1001
Just to reply to my own message, HttpPackage is just a wrapper around the response type, so I already had it. Hope this helps someone in the future.

Peter
Reply | Threaded
Open this post in threaded view
|

Re: Reading a JSON response into a val

n8han
Administrator
On 01/16/2011 06:50 AM, pr1001 [via Databinder] wrote:
> Just to reply to my own message, HttpPackage is just a wrapper around
> the response type, so I already had it. Hope this helps someone in the
> future.

No worries, I know that's confusing. I'm looking for any opportunity to
correct it (to make HttpPackage invisible in the standard case) in 0.9.0.

Nathan