API: http://tool.oschina.net/uploads/apidocs/jdk-zh/java/text/MessageFormat.html
使用单引号‘ 来实现左右大括号{}的无效设置
例如
String result = "'{\"info\":\"{0}\",\"status\":\"y\"}'";
System.out.println(MessageFormat.format(result, new Object[]{"zone"}));
API: http://tool.oschina.net/uploads/apidocs/jdk-zh/java/text/MessageFormat.html
使用单引号‘ 来实现左右大括号{}的无效设置
例如
String result = "'{\"info\":\"{0}\",\"status\":\"y\"}'";
System.out.println(MessageFormat.format(result, new Object[]{"zone"}));