type S struct { R interface{} }
d := map[string]interface{}{ "key1": "value1", "key2": "value2", }
s := &S{ R: d, }
b, _ := json.Marshal(s)
期望输出: { "key1": "value1", "key2": "value2", "rid": "xxxxx" }
希望能够把 S 中的字段展开到最终的 json 输出中,同时我想在最终输出中再加一些其他的字段(比如上面的“rid",这个能实现不?