On Wed, Jul 15, 2009 at 10:01 AM, fbettag<[email protected]> wrote:
>
> Ok, i found out that the POSTed JSON was in S.params("results").first,
> which contains:
>
> Full(Map(name -> New Content, language -> en, content -> , id -> ext-
> record-1))
>
> So i tried this:
>        for ((key, value) <- JSONParser.parse(S.params("results").first)) {
>                Log.error(key + " -> " + value)
>        }
>
> But it doesn't go through the loop. I guess it has something to do
> with the Full() around the Map.
> I tried .elements on the returned Full() for an iterable, but it still
> doesn't run through the loop.
>
> Any ideas?

If S.params("results") contain
Full(Map(name -> New Content, language -> en, content -> , id -> ext-
> record-1))

It seems like it's already parsed, in which case you could do

for (results <- S.params("results"); (key, value) <-results) {
            Log.error(key + " -> " + value)
    }

/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
-~----------~----~----~----~------~----~------~--~---

Reply via email to