Op extractOp(String opName, JSONObject opObj) throws Exception {
    Map<String, String> attrs = new TreeMap<>();
    Vertex v = null;
    if (opObj.length() > 0) {
      String[] names = JSONObject.getNames(opObj);
      for (String name : names) {
        Object o = opObj.get(name);
        if (isPrintable(o) && !o.toString().isEmpty()) {
          attrs.put(name, o.toString());
        } else if (o instanceof JSONObject attrObj) {
          if (attrObj.length() > 0) {
            if (name.equals("Processor Tree:")) {
              JSONObject object = new JSONObject(new LinkedHashMap<>());
              object.put(name, attrObj);
              v = new Vertex(null, object, this, parser);
              v.extractOpTree();
            } else {
              for (String attrName : JSONObject.getNames(attrObj)) {
                if (!attrObj.get(attrName).toString().isEmpty()) {
                  attrs.put(attrName, attrObj.get(attrName).toString());
                }
              }
            }
          }
        } else {
          throw new Exception("Unsupported object in " + this.internalName);
        }
      }
    }
    Op op = new Op(opName, null, null, null, null, attrs, null, v, parser);
    if (v != null) {
      parser.addInline(op, new Connection(null, v));
    }
    return op;
  }
@param opName
@param opObj
@return
@throws Exception
          This method address the create table operator, fetch operator,
          etc
common/src/java/org/apache/hadoop/hive/common/jsonexplain/Stage.java