Jun 22nd, 2010, 03:02 PM
serialize domain objects to a hashmap
Given the following object graph, where Author has 1 to many Books...
Is there an out of the box way to serialize this object graph to a HashMap
e.g. key is a bean property name and value is the actual value
[name="Joe", book.title="book 1", book.title="book 2"]
Is there recommended approach to this?
I know I can get to the hibernate metadata and iterate through properties etc etc. But I was hoping there would be a helper class for this. Since the databinding stuff uses this format to rebuild an object graph.... e.g. mapping a http request to domain objects...
Tags for this Thread