users@jersey.java.net

Change XML property name ?

From: Bruno Cardoso <bcardoso.home_at_gmail.com>
Date: Thu, 13 May 2010 10:42:43 +0100

Is it possible to change the name of a xml property in my class?

For example

I have class Client that has:

    public List<Account> getAccounts() {
        return accounts;
    }

In the xml the name of the property will be:
<accounts>
   <id>1</id>
    ....
</accounts>
<accounts>
   <id>2</id>
    ....
</accounts>

but I wanted it to be <account>, I know i can just change the name of the
method but is there any other way?

Thanks