This might seem like a strange question, but it's due to Legacy front-ends. Which consumed XML Based Beans in JSON or w/e.
We have some beans. Which are Annotated by @XMLAttribute and @XMLElement. These annotations seem to be ignored as we're updating our service's config to be annotation driven (Config used to be all XML system is >10 years old).
Now we were using a MappingJackson2HttpMessageConverter for JSON. I've disabled this and the JSON response respect the XMLElement name (some properties differ from the annotation, this was causing issues in our front-ends).
Now my last question, is it possible to get properties annotated with @XMLAttribute to return in @"key" format when using JSON.
e.g.
@XMLAttribute Long id;
Would return in JSON as {"@id":0}. Now it returns as {"id":0} Which is good, but not for us since we're stuck with a load of legacy code, of which some is not in our hands (clients using our API's).
We're changing the configs because we were not able to properly test all our code if anyone wonders.
So is returning the @value possible? Or would that mean a custom handler?