code: public static UNode parse(Reader reader, ContentType contentType) throws IllegalArgumentException {
          UNode result = null;
          if (contentType.isJSON()) {
              result = parseJSON(reader);
          } else if (contentType.isXML()) {
              result = parseXML(reader);
          } else {
              Utils.require(false, "Unsupported content-type: " + contentType);
          }
          return result;
      }
docs: Parse the text from the given character reader, formatted with the given content-type,
  into a UNode tree and return the root node. The reader is closed when finished.
  
  @param reader        Reader providing source characters.
  @param contentType   {@link ContentType} of text. Only JSON and XML are supported.
  @return              Root node of parsed node tree.
  @throws IllegalArgumentException  If a parsing error occurs.