commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cheong Chung Onn <chung...@hs-integrating.com>
Subject [Betwixt] Round tripping a Map object
Date Sat, 07 Feb 2004 11:09:10 GMT
Hi all,

I sieved through the archive and found that a year ago, someone has 
asked a similar question. But the solution seems complicated, and now 1 
year has past, i wonder if there is a more elegant way of solving the 
problem.

Essentially, i have a Map object converted to xml in the form
...
<entry>
	<key> xxx</key>
	<value>yyy</value>
</entry>
...

The problem here is the "Type" info is missing for both <key> and 
<value>, is it possible now to provide a hint to Betwixt to enable it 
to do a round trip for a Map object. I am thinking that if i do have a 
table which maps the <key>s to <value>s Type and assuming all the <key>

elements are String typed, can round tripping of a Map instance be done 
in a simple and straight forward manner?

<entry>
	<key>aPerson</key>          <= aPerson - String type
	<value>                                 <= Person.class
		<person>
			<name>John Doe</name>
		</person>
	</value>
</entry>

Any suggestion will be much appreciated. Thanks in advance.

Chung-Onn


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message