X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjavascript%2Fjson%2FJSON.java;h=4e9d1dd5707d536428295dcf95921849f8a59cee;hb=8fa69554edf6aeb278b4a4afd8e2b60264fdccd8;hp=57ab8c816bb85eccc62e3c10086847116b827604;hpb=b41e1c5deef715310a5b2c4c7dc9c4672dd46860;p=jalview.git diff --git a/src/jalview/javascript/json/JSON.java b/src/jalview/javascript/json/JSON.java index 57ab8c8..4e9d1dd 100644 --- a/src/jalview/javascript/json/JSON.java +++ b/src/jalview/javascript/json/JSON.java @@ -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; }