code: public static Object fromJson(String json) {
      try {
        JSONObject jsonObject = new JSONObject(json);
        if (jsonObject.has("JSON")) {
          return convert(jsonObject.get("JSON"));
        } else {
          return convert(jsonObject);
        }
      } catch (Exception e) {
        throw new RuntimeException("json=" + json, e);
      }
    }
docs: Convert a JSON representation into an object