1 String jsonString = JSON.toJSONString(list,SerializerFeature.DisableCircularReferenceDetect);//禁止循环引用保护 String jsonString = JSON.toJSONString(list,SerializerFeature.WriteNullListAsEmpty);//将list返回值null转换为[]
本文共 261 字,大约阅读时间需要 1 分钟。
1 String jsonString = JSON.toJSONString(list,SerializerFeature.DisableCircularReferenceDetect);//禁止循环引用保护 String jsonString = JSON.toJSONString(list,SerializerFeature.WriteNullListAsEmpty);//将list返回值null转换为[]
转载于:https://www.cnblogs.com/chautumn/p/10423212.html