code: @SuppressWarnings("unchecked")
      public <T extends TreeNode> TreeNode treeFrom(Object source)
              throws IOException, JSONObjectException
      {
          if (_treeCodec == null) {
               _noTreeCodec("read TreeNode");
          }
          if (source instanceof JsonParser) {
              JsonParser p = _initForReading((JsonParser) source);
              T result = (T) _treeCodec.readTree(p);
              p.clearCurrentToken();
              return result;
          }
          JsonParser p = _parser(source);
          try {
              _initForReading(_config(p));
              T result = (T) _treeCodec.readTree(p);
              JsonParser p0 = p;
              p = null;
              _close(p0, null);
              return result;
          } catch (Exception e) {
              _close(p, e);
              return null;
          }
      }
docs: Method for reading content as a JSON Tree (of type that configured
  {@link TreeCodec}, see {@link #with(TreeCodec)}) supports.