ref #10221: save the json file in human readable form
authorKatja Luther <k.luther@bgbm.org>
Tue, 21 Mar 2023 11:33:09 +0000 (12:33 +0100)
committerKatja Luther <k.luther@bgbm.org>
Tue, 21 Mar 2023 11:33:09 +0000 (12:33 +0100)
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmServerInfo.java

index b433f345d29d6179bb72051ced17b5b4ef7d6c84..b2a7048a60bac14595c09818bf9214a5a4fd8e97 100644 (file)
@@ -37,6 +37,7 @@ import org.json.JSONObject;
 
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
 
 import eu.etaxonomy.cdm.api.application.CdmApplicationRemoteConfiguration;
 import eu.etaxonomy.cdm.api.application.CdmApplicationState;
@@ -437,9 +438,10 @@ public class CdmServerInfo {
     
     public static boolean saveToConfigFile(Collection<CdmServerInfoConfig> serverList, File file) {
 
-       ObjectMapper mapper = new ObjectMapper();
+       ObjectMapper mapper = new ObjectMapper().enable(SerializationFeature.INDENT_OUTPUT);;
        try {
           mapper.writeValue(file, serverList);
+          
             
        } catch (IOException e) {
                throw new RuntimeException(e);