FasterXML / FasterXML/jackson-databind
Force root wrapping per class
- Vorherrschende Sprache
- Java
- Sterne
- 3.7k
- Forks
- 1.5k
- Ø Merge
- 3 T. 6 Std.
- Gemergte PRs (30 T.)
- 28
Beschreibung
(note: moved from https://github.com/FasterXML/jackson-annotations/issues/33 filed by @chrylis -- see there for longer discussion)
---
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?
---
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.