modify formatJson to support getClentVertion console command
@@ -13,6 +13,7 @@ public class ConsoleUtils {
public static String formatJson(String jsonStr) {
if (null == jsonStr || "".equals(jsonStr))
return "";
+ jsonStr = jsonStr.replace("\\n", "");
StringBuilder sb = new StringBuilder();
char last = '\0';
char current = '\0';
@@ -56,6 +57,8 @@ public class ConsoleUtils {
case ' ':
sb.append(current);
break;
+ case '\\':
+ break;
default:
if(!(current == " ".charAt(0)))
sb.append(current);
