On Wed, Jul 15, 2009 at 11:27 AM, fbettag<[email protected]> wrote:
>
> Any variation i try gives me:
>
> (key, value) <- res
> value filter is not a member of Any
Ahh yes, JSONParser.parse returns Box[Any] since the result can be
either a list or a map. Still, you can do it like this
for (res <- S.params("results"); json <- JSONParser.parse(res)) json match {
case m: Map[_,_] => for((k,v) <- m) k match {
case "foo" => println("Found foo %s".format(v))
case y => println("Something else: %s".format(y))
}
case x => println("Didn't parse a map: %s".format(x))
}
/Jeppe
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---