I have the following POJO (within constructors etc..):
public class GlobalData implements Serializable {
//constructors getters and setters
@org.codehaus.jackson.annotate.JsonProperty("size-guide")
private List<SizeGuide> sizeGuides;
}
With the attribute sizeGuide marked with JsonProperty , so when I marshall this using ObjectMapper , the attribute will appear in the JSON named size-guide instead of sizeGuide.
HOWEVER , this is not working , when I do the ObjectMapper.write value as String method , the attribute doesn't "change" his name , it still appear as sizeGuide.
Any hint?