org.apache.isis.viewer.restfulobjects.applib.util
Class JsonNodeUtils

java.lang.Object
  extended by org.apache.isis.viewer.restfulobjects.applib.util.JsonNodeUtils

public class JsonNodeUtils
extends Object


Method Summary
static InputStream asInputStream(org.codehaus.jackson.JsonNode jsonNode)
           
static org.codehaus.jackson.node.ObjectNode walkNodeUpTo(org.codehaus.jackson.node.ObjectNode node, List<String> keys)
          Walks the path, ensuring keys exist and are maps, or creating required maps as it goes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

asInputStream

public static InputStream asInputStream(org.codehaus.jackson.JsonNode jsonNode)

walkNodeUpTo

public static org.codehaus.jackson.node.ObjectNode walkNodeUpTo(org.codehaus.jackson.node.ObjectNode node,
                                                                List<String> keys)
Walks the path, ensuring keys exist and are maps, or creating required maps as it goes.

For example, if given a list ("a", "b", "c") and starting with an empty map, then will create:

 {
   "a": {
     "b: {
       "c": {
       }       
     }
   }
 }



Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.