code: public static RESTCommand fromUNode(UNode rootNode) {
          String name = rootNode.getName();
          Utils.require(!Utils.isEmpty(name), "Missing command name: " + rootNode.toString());
          RESTCommand cmd = new RESTCommand();
          cmd.setName(name);
          for (UNode childNode : rootNode.getMemberList()) {
              String nodeValue = childNode.getValue();
              switch (childNode.getName()) {
              case "input-entity":
                  cmd.setInputEntity(nodeValue);
                  break;
              case "methods":
                  cmd.setMethods(nodeValue);
                  break;
              case "output-entity":
                  cmd.setOutputEntity(nodeValue);
                  break;
              case "parameters":
                  for (UNode paramNode : childNode.getMemberList()) {
                      RESTParameter param = RESTParameter.fromUNode(paramNode);
                      cmd.addParameter(param);
                  }
                  break;
              case "privileged":
                  cmd.setPrivileged(Boolean.parseBoolean(nodeValue));
                  break;
              case "summary":
                  cmd.setSummary(nodeValue);
                  break;
              case "uri":
                  cmd.setURI(nodeValue);
                  break;
              default:
                  Utils.require(false, "Unknown command property: " + childNode);
              }
          }
          return cmd;
      }
docs: Create a RESTCommand from a UNode tree using the given root node. The UNode tree
  should come from a RESTCommand that was serialized from a {@link #toJSON()} call
  that was then parsed using {@link UNode} parse method. An exception is thrown if a
  parsing error occurs.
  
  @param rootNode  Root node of the deserialized {@link UNode} tree.
  @return          New RESTCommand object.