groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hubert Klein Ikkink <h.kleinikk...@gmail.com>
Subject Re: How can I convert a Map to Groovy Literal?
Date Sat, 17 Dec 2016 10:27:33 GMT
Hi,

You can use toMapString() method: http://mrhaki.blogspot.nl/2016/06/groovy-goodness-represent-map-as-string.html?m=1

Kind regards, Hubert Klein Ikkink

> Op 17 dec. 2016 om 07:59 heeft bo zhang <zhangbodut@gmail.com> het volgende geschreven:
> 
> 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']"
> 
> 

Mime
View raw message