Just out of interest, why do you want to turn beans into nested Hashtables?
commons-collections has a BeanMap so a bean can be wrapped as a Map (though
its not recursive). commons-beanutils has some helper methods that set
properties on a bean from a Map. commons-betwixt can turn beans to XML.
Would they help?

James
----- Original Message -----
From: "Matt Smith" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 19, 2002 8:27 AM
Subject: [BeanUtils] JavaBean -> HashMap/Hashtable & back converter?


Hey guys - I'm looking for something that will convert a javabean object
tree (i.e. javabean that has some properties that are also javabeans) to a
tree of nested hashtables and back. Similar to something like the SOAP bean
serializer, except I want to end up with Hashtables instead of XML. This
seems writable in a day or two, but I figure somebody HAS to have written
something like this already, and you can spend a bit of time taking care of
details like wrapping primitives, etc. I searched around the web quickly,
however, and couldn't find anything. It seems like BeanUtils has some of the
pieces, but isn't exactly what I'm looking for. Do any of you guys know a
small bit of code that does this, or have an idea about how I could use the
BeanUtils to do this quickly?

Thanks,
-Matt


__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.comm

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to