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 :)
