protobuf-javascript icon indicating copy to clipboard operation
protobuf-javascript copied to clipboard

javascript and int64 as map key

Open Notmeor opened this issue 5 years ago • 6 comments

What language does this apply to? javascript

Describe the problem you are trying to solve. With an int64 message field, one could annotate it with the option [jstype=JS_STRING], but what to do with an int64 map key?

Describe the solution you'd like Support for [jstype=JS_STRING] option with map key/value(or it's already there, but with different syntax?)

Describe alternatives you've considered

Additional context I'm using protoc 3.6.1, with proto2 syntax

Notmeor avatar Oct 14 '20 02:10 Notmeor

We're internally discussing the concept of MapOptions that would be used to facilitate this. I'll keep you posted!

perezd avatar Oct 22 '20 20:10 perezd

We're internally discussing the concept of MapOptions that would be used to facilitate this. I'll keep you posted!

looking forward to it!

Notmeor avatar Oct 29 '20 05:10 Notmeor

Is there any solution?

EchoZhaoH avatar Dec 08 '21 05:12 EchoZhaoH

This is a limitation of the current API. We're thinking of introducing an abstraction for 64 bit integers to deal with this.

dibenede avatar Sep 02 '22 22:09 dibenede