posted 8 years ago
Hello, I have created a class that has a list of Address. I have defined the class as follows:
With this I get valid JSON, however I am not happy with the XML output. The JSON is as follows:
For me the above JSON is correct as it reads "an array of addresses". How the XML feels wrong. It would need either to be or I opted to go with he latter and updated my code as follows:
This gives me the following:
The XML feels ok now as addresses is a a list of address. However the JSON is now "address" is a list of "address".
Does anyone know how to solve this one out? I use CXF not sure if that changes anything.