package main
import (
"encoding/json"
"fmt"
"sort"
"strings"
)
type AbParamInfoResp struct {
ModifiedAbParamInfo map[string]*AbParamInfo `thrift:"ModifiedAbParamInfo,1,required" json:"ModifiedAbParamInfo"`
}
type AbParamInfo struct {
Ns string `thrift:"Ns,1,required" json:"Ns"`
Version int64 `thrift:"Version,2,required" json:"Version"`
KeyPaths [][]string `thrift:"KeyPaths,3,required" json:"KeyPaths"`
}
func main () {
var str = `{"ModifiedAbParamInfo":{"data_life_keyuser_api":{"Ns":"data_life_keyuser_api","Version":24,"KeyPaths":[["douyin","private_domain_groupon_center_optimize"],["douyin","keyuser_center_local_push"],["life_alliance","keyuser_center_lynx"],["douyin","keyuser_data_center_zhongcao"],["douyin","notice_action"],["douyin","keyuser_boost_notice_action"],["douyin","keyuser_good_case_sort"],["life_aweme_author","high_saturation_filter"],["douyin","keyuser_knowledge_card"],["life_alliance","keyuser_goods_square_btn"],["life_alliance","goods_talent_collection"],["life_alliance","keyuser_center_style"],["life_alliance","keyuser_rank_new"],["life_alliance","keyuser_goods_no_force_refresh"],["life_alliance","keyuser_home_module_order"],["life_alliance","goods_card_optimization"],["life_alliance","creator_apply_lynx"],["life_alliance","keyuser_wallet_pia"],["life_alliance","keyuser_center_tab_style"],["life_alliance","keyuser_knowledge_card"],["life_alliance","goods_filter_rebuild"],["life_alliance","keyuser_diagnose_report"],["life_alliance","keyuser_level_mission"],["life_alliance","keyuser_center_nsr"],["life_alliance","keyuser_billboard_collection_btn"],["life_alliance","keyuser_billboard_switch"],["life_alliance","mission_opt_ab"],["life_alliance","keyuser_center_tab_refresh"],["douyin","notice_action"],["douyin","keyuser_boost_notice_action"],["douyin","keyuser_billboard_new_head"],["life_alliance","keyuser_register_2403"],["douyin","keyuser_billboard_new_head"],["life_alliance","keyuser_center_tab_style"],["life_alliance","keyuser_center_tab_style"],["douyin","keyuser_billboard_new_head"],["douyin","notice_action"],["life_alliance","keyuser_center_basic_camp"],["life_alliance","key_user_button"],["life_alliance","key_user_button_new"],["life_alliance","mission_auto_reach"],["life_alliance","keyuser_center_right_swipe"],["life_alliance","keyuser_center_tab_dynamic"],["life_alliance","good_task_lynx"],["life_alliance","goods_surge_rank"],["life_alliance","group_buy_to_poi_detail"],["life_alliance","life_alliance_predownload"]]}},"BaseResp":{"StatusMessage":"","StatusCode":0}}`
var resp *AbParamInfoResp
_ = json.Unmarshal([]byte(str), &resp)
var resPaths []string
for _, info := range resp.ModifiedAbParamInfo {
for _, paths := range info.KeyPaths {
resPaths = append(resPaths, strings.Join(paths, "."))
}
}
sort.Sort(sort.StringSlice(resPaths))
resBytes, _ := json.Marshal(resPaths)
fmt.Println(string(resBytes))
}