package main import ( "encoding/json" "fmt" ) func main() { a := map[string]interface{}{"appId": 2, "fcmServerKey": "keyTestTest", "name": "com.app", "version": []int{1, 2, 3}, "xyz": 3} bs, _ := json.Marshal(a) fmt.Println(string(bs)) }
package main import ( "encoding/json" "fmt" ) func main() { a := map[string]interface{}{"appId": 2, "fcmServerKey": "keyTestTest", "name": "com.app", "version": []int{1, 2, 3}, "xyz": 3} bs, _ := json.Marshal(a) fmt.Println(string(bs)) }