Ah, I see. java.util.Map is not supported. You need to use the Pivot 
collections with BeanAdapter. Did you try wrapping your map in a MapAdapter (or 
simply using a Pivot Map such as HashMap)?

On Jun 22, 2011, at 5:45 PM, Edvin Syse wrote:

> Den 22.06.2011 23:28, skrev Greg Brown:
>> Here's an example demonstrating how to use JSON.get() to access nested map 
>> properties by path:
>> 
>> package org.apache.pivot.tests;
>> 
>> import org.apache.pivot.collections.Map;
>> import org.apache.pivot.json.JSON;
>> import org.apache.pivot.json.JSONSerializer;
>> 
>> public class JSONPathTest {
>>     public static void main(String[] args) throws Exception {
>>         Map<String, ?>  map = JSONSerializer.parseMap("{data:{group:'My 
>> Group'}}");
>>         System.out.println(JSON.get(map, "data.group"));
>>     }
>> }
>> 
>> When the program is executed, "My Group" is written to the console.
> 
> Yes, but this works because JSONSerializer.parseMap returns pivots own Map 
> class, not java.util.Map as in my example. I'll comment on the ticket and 
> hold off the list to avoid double posting :)

Reply via email to