joeferner / node-java

Bridge API to connect with existing Java APIs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Long-Number conversion accuracy

cosmospostman opened this issue · comments

Hi,

Some of my Java methods return a long, whose accuracy is not maintained when converted to a JavaScript Number. The number is an ID (arithmetic operations aren't required), but I eventually need to pass it through to other Java methods.

Is there a way to accurately get the String value of this long (for display and reference in JS land) and then convert back to a long to pass to Java methods?

Thanks!

Just published a new version (v0.2.0) which keeps longs and long objects.

Thanks Joe, works like a charm!