m = [a: 123, b: 'test']
print "原来的: $m"
s = m.Inspect()
print "转成str: $s"
m2 = Eval.me(s)
print " 再转换回来: ${m2}"
Groovy map和String 互相转化
最新推荐文章于 2023-09-18 17:27:44 发布
m = [a: 123, b: 'test']
print "原来的: $m"
s = m.Inspect()
print "转成str: $s"
m2 = Eval.me(s)
print " 再转换回来: ${m2}"