我是处理 JSON 数据的新手。
我正在从 Web 服务读取数据。发回的查询数据如下:
[["B02001_001E","NAME","state"],
["4712651","Alabama","01"],
["691189","Alaska","02"],
["6246816","Arizona","04"],
["18511620","Florida","12"],
["9468815","Georgia","13"],
["1333591","Hawaii","15"],
["1526797","Idaho","16"],
["3762322","Puerto Rico","72"]]
有没有办法以这样的方式反序列化这些数据,即无需我首先定义对象的样子就可以生成基础对象?在上面的示例中,对象由第一行定义:
["B02001_001E","NAME","state"],
通常,Web 服务将返回格式化为二维 JSON 数组的查询数据,其中第一行提供列名,后续行提供数据值。