JAL-3210 Barebones gradle/buildship/eclipse. See README
[jalview.git] / src / jalview / javascript / json / JSON.java
index 8ea781f..4e9d1dd 100644 (file)
@@ -2,7 +2,6 @@ package jalview.javascript.json;
 
 import java.io.BufferedReader;
 import java.io.InputStream;
-import java.io.Reader;
 import java.net.URL;
 
 /**
@@ -36,25 +35,26 @@ 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.parseJSONRaw$S(json) || */
+  }
+
+  /**
+   * 
+   * @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 Object parse(Reader br) {
-               return /** @j2sNative swingjs.JSUtil.parseJSON$O(br) || */null;
-       }
+  }
 
        public static String stringify(Object obj) {
-               // not actually implemented.  
                return /** @j2sNative swingjs.JSUtil.stringifyJSON$O(obj) || */null;
        }