From 97699b26704291eb3847f67eb9b033d588c5ab0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 3 Mar 2023 15:08:12 +0800 Subject: [PATCH] 1' --- .../tiktok_shop/tiktok_api/transport_test.go | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/platformapi/tiktok_shop/tiktok_api/transport_test.go b/platformapi/tiktok_shop/tiktok_api/transport_test.go index 323d7401..a6a4765e 100644 --- a/platformapi/tiktok_shop/tiktok_api/transport_test.go +++ b/platformapi/tiktok_shop/tiktok_api/transport_test.go @@ -1,6 +1,7 @@ package tiktok_api import ( + "encoding/json" "fmt" "testing" ) @@ -42,3 +43,23 @@ func TestGetShipmentInfo(t *testing.T) { func TestGetStoreAutoCallRiderInfo(t *testing.T) { a.GetStoreAutoCallRiderInfo(64212030) } + +func TestMap2(t *testing.T) { + aa := `{ + "四川":[ + {"张淋":"18981810340"},{"李伟达":"18988808752"}, + {"张淋":"18981810340"},{"李伟达":"18988808752"} + ], + "广州":[ + {"张淋":"18981810340"},{"李伟达":"18988808752"}, + {"张淋":"18981810340"},{"李伟达":"18988808752"} + ], + "西安":[ + {"张淋":"18981810340"},{"李伟达":"18988808752"}, + {"张淋":"18981810340"},{"李伟达":"18988808752"} + ] +}` + list := make(map[string][]map[string]string, 0) + json.Unmarshal([]byte(aa), &list) + t.Log(list) +}