trying to force a build at builds.jalview.org
[jalview.git] / src / jalview / javascript / json / JSON.java
index af78b0f..72d8982 100644 (file)
@@ -1,14 +1,8 @@
 package jalview.javascript.json;
 
 import java.io.BufferedReader;
-import java.io.IOException;
 import java.io.InputStream;
-import java.io.Reader;
 import java.net.URL;
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
 
 /**
  * 
@@ -22,7 +16,7 @@ import java.util.List;
  * methods for extracting data. [get(), contains(), probably should add keySet,
  * valueSet, and entrySet].
  * 
- * @author hansonr Bob Hanson St. Olaf College 1/24/2019
+ * @author hansonr Bob Hanson St. Olaf College 1/24/2019+
  *
  */
 public class JSON {
@@ -41,20 +35,27 @@ public class JSON {
        }
 
        public static void setAjax(URL url) {
-               /** @j2sNative swingjs.JSUtil.setAjax$O(url) */;
+    /** @j2sNative swingjs.JSUtil.setAjax$java_net_URL(url); */
        }
 
        public static BufferedReader getJSONReader(InputStream is) {
                return /** @j2sNative swingjs.JSUtil.getJSONReader$O(is) || */null;
-       }
-
-       @SuppressWarnings("resource")
-       public static Object parse(String json) {
-               return /** @j2sNative swingjs.JSUtil.parseJSON$O(json) || */null;
-       }
-
-       public static Object parse(Reader br) {
-               return /** @j2sNative swingjs.JSUtil.parseJSON$O(br) || */null;
+  }
+
+  /**
+   * 
+   * @param obj
+   *          as String, Reader, InputStream, or JavaScript Object or Array
+   * @return Map or List
+   */
+  public static Object parse(Object obj)
+  {
+    return /** @j2sNative swingjs.JSUtil.parseJSON$O(obj) || */
+    null;
+  }
+
+       public static String stringify(Object obj) {
+               return /** @j2sNative swingjs.JSUtil.stringifyJSON$O(obj) || */null;
        }
 
 }