Conversion between JSON with wrapped structure and pojo with flattended structure
问题 I have a JSON structure that incorporates a wrapping level that I don't have in my POJOs. Like so: JSON: { "category1": { "cat1Prop1": "c1p1", "cat1Prop2": "c1p2", "cat1Prop3": "c1p3" }, "category2": { "cat2Prop1": "c2p1", "cat2Prop2": "c2p2" }, "category3": { "cat3Prop1": "c3p1", "cat3Prop2": "c3p2", "cat3Prop3": "c3p3" }, "category4": { "cat4Prop1": "c4p1" } } POJO: public class MyPojo { private String cat1Prop1; private String cat1Prop2; private String cat1Prop3; private String cat2Prop1;