在go中编码json标签

I'm trying to change encoding in json, and used both encoding/json and jsoniter. What I'm trying to accomplish is that if I supply a language, it will encode relevant field names as "name@lang" instead of "name". I've ben trying the following:

func registerFieldEncoder(field string) {
encoderFunc := func(p unsafe.Pointer, stream *jsoniter.Stream) {
    fmt.Print("test")
    str := *(*string)(unsafe.Pointer(p))
    newstr := str + "@sv"
    stream.WriteString(newstr)
}
isEmptyFunc := func(p unsafe.Pointer) bool {
    str := *(*string)(unsafe.Pointer(p))
    return len(str) == 0
}
jsoniter.RegisterTypeEncoderFunc(field, encoderFunc, isEmptyFunc)
jsoniter.RegisterFieldEncoderFunc("", field, encoderFunc, isEmptyFunc) }

The field represents the json tag, i.e.

`json:"field`

Is this possible to accomplish in go?

Unmarshall the json as map[string]interface{}

write a function that recurses into the map[string]interface looking for keys called "name"

copy these keys to "name@lang" in the same map and then delete the "name" key

Marshall the modified map out again