Hello,
I'm using 'json_name' field option, but it doesn't work.
My proto is
message GeoCoordinate {
double latitude = 1 [ json_name = "lat" ];
double longitude = 2 [ json_name = "long" ];
}
But in Go,
a := GeoCoordinate{}
a.Latitude = 1.2
b, _ := json.Marshal(a)
fmt.Printf("a=%s\n", string(b))
The output was
a={"latitude":1.2}
Did I miss anything?
Thanks,
--
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.