map<key_type, value_type> map_field = N;
message MapFieldEntry {
key_type key = 1;
value_type value = 2;
}
repeated MapFieldEntry map_field = N;
Map syntax is equivalent to the following on the wire.
According to my understanding, MapFieldEntry can be serialized without reflection, why Go pb use the reflection to achieve map's realization, is it just for convenience?
Now there is no reflection without the realization of it?
Aucun commentaire:
Enregistrer un commentaire