这是json数据(我无法控制)
{
"colors": {
"668": {
"name": "Pink Ice",
"base_rgb": [
128,
26,
26
],
"cloth": {
"brightness": 50,
"contrast": 1.36719,
"hue": 8,
"saturation": 0.351563,
"lightness": 1.36719,
"rgb": [
216,
172,
164
]
},
"leather": {
"brightness": 47,
"contrast": 1.71875,
"hue": 8,
"saturation": 0.234375,
"lightness": 1.71875,
"rgb": [
207,
170,
163
]
},
"metal": {
"brightness": 47,
"contrast": 1.64063,
"hue": 8,
"saturation": 0.429688,
"lightness": 1.48438,
"rgb": [
211,
145,
134
]
}
}
},
"657": {
"name": "Pastel Pink",
"base_rgb": [
128,
26,
26
],
"cloth": {
"brightness": 52,
"contrast": 1.40625,
"hue": 8,
"saturation": 0.585938,
"lightness": 1.40625,
"rgb": [
247,
170,
157
]
},
"leather": {
"brightness": 52,
"contrast": 1.40625,
"hue": 8,
"saturation": 0.546875,
"lightness": 1.40625,
"rgb": [
243,
172,
159
]
},
"metal": {
"brightness": 47,
"contrast": 1.5625,
"hue": 8,
"saturation": 0.546875,
"lightness": 1.40625,
"rgb": [
220,
141,
126
]
}
}
}
我一生都无法弄清楚如何构建类来存储它。“668”(id num)是我的绊脚石。
我知道在不展示我尝试过的东西的情况下寻求帮助不是很好的形式,但是我尝试过的任何东西都没有接近,而且它只会占用大量空间而无处可去。