Reputation: 28608
I would like to be able to turn strings to object back and forth in groovy.
For example
def mapString = "['guy':'mograbi']"
def myMap = Eval.me(mapString)
def savedString = myMap.toString()
def savedMap = Eval.me(savedString)
the last line fails because toString
does not output a String I can evaluate.
How can I turn the map to a string I can evaluate?
Upvotes: 1
Views: 1474