j2sNative clean-up. Fixes problem with second try of sequence fetching
[jalview.git] / src / jalview / javascript / json / JSON.java
index 57ab8c8..4e9d1dd 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;
 
 /**
  * 
@@ -41,24 +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.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) {
-               // not actually implemented.  
                return /** @j2sNative swingjs.JSUtil.stringifyJSON$O(obj) || */null;
        }