如何通过Retrofit 2处理动态JSON响应

时间:2017-06-09 07:15:48

标签: android json retrofit2

我想要的是什么:

我想处理这个" facets_att"还有更多,完全是动态的。可以使用关键值。     请不要解释为我提供一些示例以便我可以获得一些想法来构建它。

 {
      "code": 200,
      "status": "OK",
      "object": {
        "results": {
          "facets_att": {
            "occasion": {
              "casual": 76
            },
            "collar": {
              "v neck": 76
            },
            "gender": {
              "female": 76
            },
            "color": {
              "red": 1,
              "sky": 1,
              "blue": 2,
              "white": 1,
            },
            "fit": {
              "regular fit": 76
            },
            "sleeve type": {
              "12/4 sleeve": 1,
              "14/4 sleeve": 1,
            },
            "size": {
              "s": 76,
              "xl": 76,
              "xs": 1,
            },
            "material": {
              "georgette": 5,
              "georgette sattine": 71
            },
            "fabric": {
              "125% cotton": 1,
              "108% cotton": 1,
              "153% cotton": 1,

            },
            "necktype": {
              "v neck": 76
            },
            "season": {
              "spring summer": 76
            },
            "material type": {
              "georgette": 5,
              "georgette sattine": 71
            },
            "style": {
              "spring summer": 76
            },
            "washcare": {
              "normal wash": 76
            },
            "pattern type": {
              "printed": 76
            }
          },
          "facets": {
            "category.level0": [
              {
                "Clothing": 76
              }
            ],
            "category.level1": [
              {
                "Clothing/Women": 76
              }
            ],
            "category.level2": [
              {
                "Clothing/Women/Kurti": 76
              }
            ],
            "price": {
              "6140.0": 1,
              "6161.0": 1,
             },
            "brand_name": {
              "born mark": 76
            }
          }
        }
      }
    }

0 个答案:

没有答案