Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HowTo --> GroovyShell().evaluate("['item1', 'item2', 'item3']")

 
John Dee
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Would someone happen to know how to take a List or Map defined as a String (i.e. read off an InputStream) and assign the contents of that string to a List/Map object.

Something like GroovyShell().evaluate("[name:'nameVale', phone:'phoneVal', zip:'zipVal']"), but this does not work. I get the following error message:

No signature of method: com....GroovyShell() is applicable for argument types: () values: []

Thanks!
 
Craig Treptow
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This looks helpful:

Stack Overflow - Best Way To Code This
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic