jhump/protoreflect

*Message can't convert to the correct json format

Dimp1e opened this issue · 1 comments

proto:
message TestResponse {
int64 code = 1;
string message = 2;
string data = 3;
}

server:
respM, err := dynamic.AsDynamicMessage(res)
if err != nil {
panic(err)
}
respJ, err := resM.MarshalJSON()
if err != nil {
panic(err)
}
fmt.Println(string(respJ))

result:
{"code":"12323","message":"2131world","data":"hello"}

the value of code can't convert to the correct json format(int64)