3 ms·
In JS, it's a good idea anyway to use some JSON parsing library instead of JSON.parse. With Zod, you can use z.bigint() parser. If you take the "parse any JSON
by pzmarzly 3y ago
In JS, it's a good idea anyway to use some JSON parsing library instead of JSON.parse.
With Zod, you can use z.bigint() parser. If you take the "parse any JSON" snippet https://zod.dev/?id=json-type https://zod.dev/?id=json-type and change z.number() to z.bigint(), it should do what you are looking for.