![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
true-json-bigint
Advanced tools
Enhanced fork of json-bigint that allows parsing all big number values in JSON strings.
This is a module for parsing JSON strings to JSON objects and stringifying JSON objects to JSON strings. It is a fork of json-bigint 0.3.0, but enhances the original module in the following aspects.
The module generally works in the same way as the original one. Use the following command to add true-json-bigint into the node_moduels directory of your application:
$ npm install true-json-bigint
Parse JSON strings as described in the next example:
const JSONbig = require('true-json-bigint');
const json = '{"smallNumber": 1, "bigNumber" : 987654321123456789987654321}';
const result = JSONbig.parse(json);
console.log(result);
// { smallNumber: 1, bigNumber: BigNumber { s: 1, e: 26, c: [ 9876543211234, 56789987654321 ] } }
As can be seen in the following example, stringifying a JSON object that contains a big number can easily be done by using the stringify function of this module.
const JSONbig = require('true-json-bigint');
const BigNumber = require('bignumber.js');
const json = {}
json.smallNumber = 1
json.bigNumber = BigNumber('987654321123456789987654321');
const result = JSONbig.stringify(json);
console.log(result);
// {"smallNumber":1,"bigNumber":9.87654321123456789987654321e+26}
See the README of json-bigint 0.3.0 for further details on how to use this module.
FAQs
Enhanced fork of json-bigint that allows parsing all big number values in JSON strings.
The npm package true-json-bigint receives a total of 1,452 weekly downloads. As such, true-json-bigint popularity was classified as popular.
We found that true-json-bigint demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.