Force root wrapping per classSee original GitHub issue
I’m working on mapping an external service that sends postbacks in wrapped JSON. I have set the
@JsonRootName on the class and can read objects with a specially-configured mapper, but this wrapping behavior belongs to this service (i.e., a certain set of classes) specifically, and not to the overall system (Spring MVC, which expects a single mapping configuration).
Since it’s known that this class will always need to be unwrapped, and request classes wrapped, it would be much clearer to be able to force root wrapping per class, perhaps with an
alwaysWrap field on the
@JsonRootName annotation. Is this a feasible feature?
- Created 9 years ago
- Comments:16 (10 by maintainers)
Top GitHub Comments
Is there a plan to include this one in near future? We are quite depending on it, so we need to plan at least 😃