how J2V8 returns Big integer?

185 views Asked by At

At present I am using v8 version below for my windows: com.eclipsesource.j2v8:j2v8_win32_x86_64:4.6.0.

I want to return Big integer but looks like this version does not support Big Int. return {'result' : BigInt('893800399029639267')}; This does not return anything.

Other options like below also does not work: const value = 893800399029639267n This gives error.

Kindly suggest, how can I return BigInt?

2

There are 2 answers

1
Pandelis On BEST ANSWER

BigInt was introduced in 6.7 my dude.

It looks like you're on 4.6

https://v8.dev/blog/v8-release-67

0
sparrow. On

I recently found out about an alternative to J2V8 called javet. I recommend checking it out. It supports BigInt, it's actively maintained and is up to date with node.js LTS