Java Mailing List Archive

http://www.gg3721.com/

Home » user.groovy »

[groovy-user] Marshaling list to string and vice versa

Darryl Pentz

2008-09-03

Replies: Find Java Web Hosting

Author LoginPost Reply

I found that if I do:

def someList = ["foo", "bar"]
String myStr = someList.toString()

myStr will have "[foo, bar]"

Is there any way to reverse that marshaling, so something along the lines
of:

def someList = myStr as List

which is incorrect because it makes someList = ['[', 'f', 'o', 'o', ....]
etc. Or do I have to do it the hard way splitting and whatnot?

thanks,
Darryl
--
Sent from the groovy - user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email


©2008 gg3721.com - Jax Systems, LLC, U.S.A.