Description: JSONObject was wrongly invoked
 It was called with a wrong package name, "simple" being forgotten.
 Moreover it is called on an AlignmentPojo object, I added the getAppSettings
 method in the call to get a HashMap<String, Object>.
Author: Pierre Gruet <pgt@debian.org>
Forwarded: jalview-dev@jalview.org
Last-Update: 2020-11-15

--- a/src/jalview/io/JSONFile.java
+++ b/src/jalview/io/JSONFile.java
@@ -219,7 +219,7 @@
         }
       }
 
-      jsonOutput = JSONUtils.stringify(jsonAlignmentPojo);
+      jsonOutput = JSONUtils.stringify(new org.json.simple.JSONObject(jsonAlignmentPojo.getAppSettings()));
       return jsonOutput.replaceAll("xstart", "xStart").replaceAll("xend",
               "xEnd");
     } catch (Exception e)
--- a/src/jalview/util/JSONUtils.java
+++ b/src/jalview/util/JSONUtils.java
@@ -85,9 +85,9 @@
     return Platform.parseJSON(json);
   }
 
-  public static String stringify(Object obj)
+  public static String stringify(org.json.simple.JSONObject obj)
   {
-    return new org.json.JSONObject(obj).toString();
+    return obj.toString();
   }
 
 }
