Is this possible way to add nested json "as is". The nested json doesn't have any structure and might be different. I need to put the nested json data directly to the root node.
https://play.golang.org/p/MzBt7DLQEpD
type RootJson struct {
NestedJson []byte
AdditionalField string
}
func main() {
nestedJson := []byte("{\"number\": 1, \"string\": \"string\", \"float\": 6.56}")
rootJson := RootJson{nestedJson, "additionalField"}
payload, _ := json.Marshal(&rootJson)
fmt.Println(string(payload))
}