A selective serialization ability of a multilayer object graph would be really convenient. This will provide the efficiency of lazyloading with the convenience of deep loading.
Of course, circular reference and other such issues need to be addressed.
One very good example is the way FlexJson parser in spring roo works. Here's a code snippet.
String[] fields = { "person.firstName", "person.LastName", "person.child.firstName", "person.child.lastName",
"person.child.grandchild.firstName", "person.child.grandchild.lastName"}
parser.serialize(person, fields);
Of course, circular reference and other such issues need to be addressed.
One very good example is the way FlexJson parser in spring roo works. Here's a code snippet.
String[] fields = { "person.firstName", "person.LastName", "person.child.firstName", "person.child.lastName",
"person.child.grandchild.firstName", "person.child.grandchild.lastName"}
parser.serialize(person, fields);