我将如何解析这个 Json 字符串?
'{ ' "领土": { ' "RSC": { ' "sector": 1, ' "size": 3, ' "density": 2, ' "slots": 18, ' "daily_respect": 113, ' “派系”:13784,'“coordinate_x”:“3199.2”,'“coordinate_y”:“2828.32”,'},'“HSC”:{'“扇区”:1,'“大小”:4,'“密度": 3, ' "插槽": 26, '"daily_respect": 197, ' "faction": 13784, ' "coordinate_x": "3457.41", ' "coordinate_y": "2785.98", ' }, ' "JSC": { ' "sector": 1, ' "size ": 2, ' "密度": 3, ' "slots": 8, ' "daily_respect": 141, ' "faction": 13784, ' "coordinate_x": "3479.67", ' "coordinate_y": "2819.67", ' }, '"NTC": { ' "sector": 1, ' "size": 3, ' "density": 2, ' "slots": 21, ' "daily_respect": 113, ' "faction": 13784, ' "coordinate_x" : "3416.45", ' "coordinate_y": "2868.95", ' }, ' "OTC": { ' "sector": 1, ' "size": 4, ' "density": 3, ' "slots": 24 , ' "daily_respect": 197, ' "派系”:13784,'“coordinate_x”:“3417.68”,'“coordinate_y”:“2904.79”,'},'“QTC”:{'“扇区”:1,'“大小”:3,'“密度” : 2, ' "slots": 12, ' "daily_respect": 113, ' "faction": 13784, ' "coordinate_x": "3395.34", ' "coordinate_y": "3039.22", ' }, ' "RTC": { ' "扇区": 1, '"size": 3, ' "density": 2, ' "slots": 16, ' "daily_respect": 113, ' "faction": 13784, ' "coordinate_x": "3366.33", ' "coordinate_y": "3012.11 ", ' }, ' "TTC": { ' "sector": 1, ' "size": 4, ' "density": 3, ' "slots": 28, ' "daily_respect": 197, ' "faction" : 13784, ' "坐标x":"3244.33",'"坐标y":"2799.8",'},'"UTC":{'"扇区":1,'"大小":3,'"密度":2,'"槽" : 12, ' "daily_respect": 113, ' "faction": 13784, ' "coordinate_x": "3278.81", ' "coordinate_y": "2756.83", ' "racket": { ' "name": "Truck Stop II ", ' "等级": 2, '"reward": "20x Can of Munster daily", ' "created": 1604663824, ' "changed": 1645588625, ' }, ' },
Dim response As Object
Set response = JsonConverter.ParseJson(request.responseText)
Dim iCounter As Integer
Dim RCounter As Integer
Dim CCounter As Integer
iCounter = 1
Dim territory As Dictionary
Set territory = response("territory")
Dim Block_id As Variant
For Each Block_id In territory
Debug.Print Block_id
Sheet7.Range("a115").Offset(iCounter, 0).Value = Block_id
For Each sector In Block_id
Sheet7.Range("a115").Offset(iCounter, 1).Value = sector
Next sector
iCounter = iCounter + 1
Next Block_id
块 ID 打印正确,但不是“扇区”。对于尺寸,密度,插槽等,我必须相同,而“球拍”及其物品则需要另一个级别。我一直在研究字典和收藏,但无法弄清楚。请帮忙!