git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9e2d4ee
)
JSON writing fix, JColorChooser (mnemonic change) fix
author
hansonr
<hansonr@STO24954W.ad.stolaf.edu>
Tue, 29 Jan 2019 21:10:46 +0000
(15:10 -0600)
committer
hansonr
<hansonr@STO24954W.ad.stolaf.edu>
Tue, 29 Jan 2019 21:10:46 +0000
(15:10 -0600)
src/jalview/io/JSONFile.java
patch
|
blob
|
history
src/jalview/javascript/json/JSON.java
patch
|
blob
|
history
src/jalview/util/JSONUtils.java
patch
|
blob
|
history
srcjar/org/json/JSONObject.java
patch
|
blob
|
history
swingjs/SwingJS-site.zip
patch
|
blob
|
history
swingjs/timestamp
patch
|
blob
|
history
swingjs/ver/3.2.4/SwingJS-site.zip
patch
|
blob
|
history
swingjs/ver/3.2.4/timestamp
patch
|
blob
|
history
diff --git
a/src/jalview/io/JSONFile.java
b/src/jalview/io/JSONFile.java
index
390c771
..
427ad8f
100644
(file)
--- a/
src/jalview/io/JSONFile.java
+++ b/
src/jalview/io/JSONFile.java
@@
-218,8
+218,8
@@
public class JSONFile extends AlignFile implements ComplexAlignFile
jsonAlignmentPojo.getSeqGroups().add(seqGrpPojo);
}
}
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)
return jsonOutput.replaceAll("xstart", "xStart").replaceAll("xend",
"xEnd");
} catch (Exception e)
diff --git
a/src/jalview/javascript/json/JSON.java
b/src/jalview/javascript/json/JSON.java
index
1c3ac98
..
57ab8c8
100644
(file)
--- a/
src/jalview/javascript/json/JSON.java
+++ b/
src/jalview/javascript/json/JSON.java
@@
-57,4
+57,9
@@
public class JSON {
return /** @j2sNative swingjs.JSUtil.parseJSON$O(br) || */null;
}
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;
+ }
+
}
}
diff --git
a/src/jalview/util/JSONUtils.java
b/src/jalview/util/JSONUtils.java
index
f91275d
..
127a085
100644
(file)
--- a/
src/jalview/util/JSONUtils.java
+++ b/
src/jalview/util/JSONUtils.java
@@
-1,6
+1,7
@@
package jalview.util;
import jalview.javascript.json.JSON;
package jalview.util;
import jalview.javascript.json.JSON;
+import jalview.json.binding.biojson.v1.AlignmentPojo;
import java.io.FileReader;
import java.io.IOException;
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));
}
return (Platform.isJS() ? JSON.parse(json) : new JSONParser().parse(json));
}
+public static String stringify(Object obj) {
+ return new org.json.JSONObject(obj).toString();
+}
+
}
}
diff --git
a/srcjar/org/json/JSONObject.java
b/srcjar/org/json/JSONObject.java
index
d2ea0f9
..
3a3307e
100644
(file)
--- a/
srcjar/org/json/JSONObject.java
+++ b/
srcjar/org/json/JSONObject.java
@@
-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);
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;
}
}
return key;
}
diff --git
a/swingjs/SwingJS-site.zip
b/swingjs/SwingJS-site.zip
index
7079c67
..
e50b5bb
100644
(file)
Binary files a/swingjs/SwingJS-site.zip and b/swingjs/SwingJS-site.zip differ
diff --git
a/swingjs/timestamp
b/swingjs/timestamp
index
4f24039
..
a0bfab3
100644
(file)
--- a/
swingjs/timestamp
+++ b/
swingjs/timestamp
@@
-1
+1
@@
-20190129013326
+20190129150841
diff --git
a/swingjs/ver/3.2.4/SwingJS-site.zip
b/swingjs/ver/3.2.4/SwingJS-site.zip
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
diff --git
a/swingjs/ver/3.2.4/timestamp
b/swingjs/ver/3.2.4/timestamp
index
4f24039
..
a0bfab3
100644
(file)
--- a/
swingjs/ver/3.2.4/timestamp
+++ b/
swingjs/ver/3.2.4/timestamp
@@
-1
+1
@@
-20190129013326
+20190129150841