import com.google.gson.Gson
import com.alibaba.fastjson.{JSON, JSONObject}
import java.util
object local {
case class User1(id: Long,organization_id: Long,username: String ,role_names: String ,role_ids: String,locked: Boolean)
def main(args: Array[String]): Unit = {
// val gson = new Gson()
//
//
// val e = gson.toJson(User1(1,1,"admin","admin, 图计算管理层","1,2,3,4",false))
// println(e.getClass.getSimpleName)
val jsonObj2 :JSONObject= new JSONObject()
jsonObj2.put("zxtotal", "2")
jsonObj2.put("zxtota1l", "211")
val jsonObj :JSONObject= new JSONObject()
jsonObj.put("zxtotal", "1")
jsonObj.put("zxtota1l", "11")
val jsonObj1 :JSONObject= new JSONObject()
jsonObj1.put("abc",jsonObj)
jsonObj1.put("abc",jsonObj2)
println(jsonObj)
println(jsonObj1)
val map = new util.HashMap[String, Object]()
map.put("abc", List(jsonObj,jsonObj2).toArray)
val gson = new Gson()
val gson1 = gson.toJsonTree(map)
println(gson1.getClass.getSimpleName)
println( gson.toJson(map) )
}
}