JSON refactoring of a few methods; fixing JavaScript issues
[jalview.git] / src / jalview / javascript / json / JSON.java
index 8ea781f..dff4963 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;
 
 /**
@@ -43,18 +42,19 @@ public class JSON {
                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;
        }