question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Force root wrapping per class

See 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?

Issue Analytics

  • State:open
  • Created 9 years ago
  • Reactions:8
  • Comments:16 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
ghostcommented, Nov 26, 2015

Is there a plan to include this one in near future? We are quite depending on it, so we need to plan at least 😃

0reactions
cowtowncodercommented, Oct 23, 2020

@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.

Read more comments on GitHub >

github_iconTop 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 >
Bountysource
Force root wrapping per class.
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 >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found