Hello,

  You can use 'inspect' method:

    groovy> println ([a: 'b'].inspect())
    ['a':'b']

Warm regards,
Michal

W dniu 2016-12-17 07:59, bo zhang napisał(a):
Hi everybody, I want to convert a Map to Groovy literal, is there
convenient methods to do this or I have to write it myself?

For example,

assert convert(map)=="[a:'a',b:'b']"

Reply via email to