You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello!
I encountered a problem with uint64-keys in protobuf maps when I try to call toJSON() method - in case of quite big number it throws an exception: "Value is larger than Number.MAX_SAFE_INTEGER"
I noticed that regular uint64-fields are converted like this: obj.objectId = (message.objectId || Long.UZERO).toString();
While maps try to do it like this: message.floorNames.forEach((v, k) => { obj.floorNames[longToNumber(k)] = v; });
Why do the approaches differ here? Is this done on purpose?
I haven't found any flag to change the way the code is generated.
Thanks!
The text was updated successfully, but these errors were encountered:
Hello!
I encountered a problem with uint64-keys in protobuf maps when I try to call toJSON() method - in case of quite big number it throws an exception: "Value is larger than Number.MAX_SAFE_INTEGER"
I noticed that regular uint64-fields are converted like this:
obj.objectId = (message.objectId || Long.UZERO).toString();
While maps try to do it like this:
message.floorNames.forEach((v, k) => { obj.floorNames[longToNumber(k)] = v; });
Why do the approaches differ here? Is this done on purpose?
I haven't found any flag to change the way the code is generated.
Thanks!
The text was updated successfully, but these errors were encountered: