Force root wrapping per class
See original GitHub issueI’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?
Issue Analytics
- State:
- Created 9 years ago
- Reactions:8
- Comments:16 (10 by maintainers)
Top Results From Across the Web
Force Jackson to add addional wrapping using annotations
With Jackson 2.x use can use the following to enable wrapper without adding addition properties in the ObjectMapper
Read more >TF1 Class Reference - ROOT
Called by functions such as SetRange, SetNpx, SetParameters to force the deletion of the associated ... Functor object to wrap any C++ callable...
Read more >Mastering wrapping of flex items - CSS: Cascading Style Sheets
Typically flexbox-based grid systems work by taking flexbox back to the familiar world of float-based layouts. If you assign percentage widths ...
Read more >SizedBox class - widgets library - Flutter - Dart API docs
This can be remedied by wrapping the child SizedBox in a widget that does permit it to be any size up to the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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 😃
@malloc32 for help with usage etc, mailing lists would be the place to ask, not issue. I can’t think of anything simple that would do this automatically just based on annotation.