它可以支持null,字符串,数字、日期、集合、数组以及自定义对象 等多种数据类型,包括以上任意类型的多层嵌套。
另外对于存储基本类型元素的数组而言,实在没有更好的处理办法,因此占用了很多代码行数。...static void main(String[] args) throws IllegalAccessException {
Demo demo = Demo.getObj();
String json...= JsonUtil.toJsonStr(demo);
System.out.println(json);
}
public static Demo getObj(){
Demo demo = new...7,8,9,10,11],[6,7,8,9,10],[5,6,7,8,9],[4,5,6,7,8],[3,4,5,6,7],[2,3,4,5,6],[1,2,3,4,5],[0,1,2,3,4]]}}
可以放到 json