![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.
decimaljson
Advanced tools
Very simple JSON parser that preserves the full precision of numbers. It
is a fork of json_parse.js
from
JSON-js. This module should
work in browsers and any CommonJS system (tested with Node.js)
Numbers will be parsed into a Decimal class, with .string
and
.number
attributes
For Node.js:
npm install decimaljson
For browser use:
<script src='decimaljson.js' />
<!-- DJSON will be available as a global now -->
// Only for Node.js
> var DJSON = require('decimaljson')
> var array = DJSON.parse('[1.0000000000000001]')
> array
[ Decimal(1.0000000000000001) ]
> array[0].string
'1.0000000000000001'
> array[1].number
1
Benchmarks for DJSON.parse
and DJSON.stringify
are provided. Here are some
example results from my laptop:
node 0.2.6 (x86, v8 2.3.8):
- JSON.parse is 2x faster than DJSON.parse
- JSON.stringify and DJSON.stringify are the same speed
node 0.4.1 (x86, v8 3.1.5):
- JSON.parse is 4.5x faster than DJSON.parse
- JSON.stringify is 3x faster than DJSON.stringify
FAQs
JSON parser that preserves precision
The npm package decimaljson receives a total of 2 weekly downloads. As such, decimaljson popularity was classified as not popular.
We found that decimaljson demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers 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.