JSON writing fix, JColorChooser (mnemonic change) fix
authorhansonr <hansonr@STO24954W.ad.stolaf.edu>
Tue, 29 Jan 2019 21:10:46 +0000 (15:10 -0600)
committerhansonr <hansonr@STO24954W.ad.stolaf.edu>
Tue, 29 Jan 2019 21:10:46 +0000 (15:10 -0600)
src/jalview/io/JSONFile.java
src/jalview/javascript/json/JSON.java
src/jalview/util/JSONUtils.java
srcjar/org/json/JSONObject.java
swingjs/SwingJS-site.zip
swingjs/timestamp
swingjs/ver/3.2.4/SwingJS-site.zip
swingjs/ver/3.2.4/timestamp

index 390c771..427ad8f 100644 (file)
@@ -218,8 +218,8 @@ public class JSONFile extends AlignFile implements ComplexAlignFile
           jsonAlignmentPojo.getSeqGroups().add(seqGrpPojo);
         }
       }
-      org.json.JSONObject generatedJSon = new org.json.JSONObject(jsonAlignmentPojo);
-      jsonOutput = generatedJSon.toString();
+      
+      jsonOutput = JSONUtils.stringify(jsonAlignmentPojo);
       return jsonOutput.replaceAll("xstart", "xStart").replaceAll("xend",
               "xEnd");
     } catch (Exception e)
index 1c3ac98..57ab8c8 100644 (file)
@@ -57,4 +57,9 @@ public class JSON {
                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;
+       }
+
 }
index f91275d..127a085 100644 (file)
@@ -1,6 +1,7 @@
 package jalview.util;
 
 import jalview.javascript.json.JSON;
+import jalview.json.binding.biojson.v1.AlignmentPojo;
 
 import java.io.FileReader;
 import java.io.IOException;
@@ -84,4 +85,8 @@ public class JSONUtils
        return (Platform.isJS() ? JSON.parse(json) : new JSONParser().parse(json));
   }
 
+public static String stringify(Object obj) {
+       return new org.json.JSONObject(obj).toString();
+}
+
 }
index d2ea0f9..3a3307e 100644 (file)
@@ -1549,6 +1549,13 @@ public class JSONObject {
             key = key.toLowerCase(Locale.ROOT);
         } else if (!Character.isUpperCase(key.charAt(1))) {
             key = key.substring(0, 1).toLowerCase(Locale.ROOT) + key.substring(1);
+            /**
+             * remove j2s signature
+             * 
+             * @j2sNative
+             * 
+             * key = key.split("$")[0];
+             */
         }
         return key;
     }
index 7079c67..e50b5bb 100644 (file)
Binary files a/swingjs/SwingJS-site.zip and b/swingjs/SwingJS-site.zip differ
index 4f24039..a0bfab3 100644 (file)
@@ -1 +1 @@
-20190129013326 
+20190129150841 
index 7079c67..e50b5bb 100644 (file)
Binary files a/swingjs/ver/3.2.4/SwingJS-site.zip and b/swingjs/ver/3.2.4/SwingJS-site.zip differ
index 4f24039..a0bfab3 100644 (file)
@@ -1 +1 @@
-20190129013326 
+20190129150841