Hi, I've recently started to use Restlet. I have a GET method like the following:
@Get public HashMap users() { HashMap myUsers = getUserMap(); return myUsers ; } I can receive both JSON and XML data by setting the appropriate accept headers in my client. However I'm not happy with the data returned. I get something like this: <map> <entry> <string>John</string> <string>Boston</string> </entry> <entry> <string>Paul</string> <string>Paris</string> </entry> </map> However I really want it in this form: <users> <user> <name>John</name> <location>Boston</location> </user> <user> <name>Paul</name> <location>Paris</location> </user> </users> I assume I need to write some sort of getter to extract the data from the Hashmap and present it to be returned but I'm not sure how to start. Thanks for your help, John ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2714804