
Product
Reachability for Ruby Now in Beta
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.
superjsonatural
Advanced tools
SuperJSONatural ⚡⚡⚡ < ~9kB | JSON or Buffer with TypedArray, faster than CBOR & JSON and msgpackr in some case.

JSON yet, somehow lighter & faster with the support of all JS TypedArray! It uses a Base64 optimized algorithm... when you use stringify and parse
And for pack/unpack usage, it is binary serialization which use a JSON tree and lookup table which refer to a buffer appended to the json also encoded inside a buffer using TextEncoder(), up to 5x faster and somehow significally faster than the trusted CBOR-X while being 3.5x lighter! Check the demo ;)
If you use larger TypedArray than buffer, simply use pack/unpack and work with ArrayBuffer. Meanwhile if you can't, the good old stringify/parse function will works fine based on String!
DEMO : Go to codepen.io :sparkles:
| NPM Package | Packing | Unpacking |
|---|---|---|
| OURS | 182ms | 144ms |
| CBOR-X | 202ms (+8%) | 246ms (+70%) |
Stringify takes 92ms while parsing take 255ms when it comes to working with string instead of the above BytesArray packing/unpacking methods, still worth the move!
Download it from NPM easily
Run :
+ npm install superjsonatural
And you get that piece of technology for JSON parsing!
import SuperJSONatural from "superjsonatural"; // In node.js
/* OR */
var SuperJSONatural = window.SuperJSONatural; // Use the minified version for browser (> safari 10 & > Chrome 51)
var data = {
name: "Prof. Bernice Champlin Jr.",
male: true,
female: false,
timestamp: Date.now(),
hair: Uint8Array.of(0, 55, 77, 65, 9, 1, 1, 1, 1, 200, 44, 22, 9, 0),
email: "stevie.conn@luettgen.com",
phone: 3476774277,
description: "Et voluptatem incidunt repellat. Qui laboriosam quis accusamus optio sed. Non qui qui quasi aliquid.",
other: {
ANARRAY: ["lol", 99],
prop: 992,
str: "str",
hair: Uint32Array.of(999)
}
};
// It will be a string when encoded, always
var encoded = SuperJSONatural().stringify(data);
var decoded = SuperJSONatural().parse(encoded);
console.log(data, encoded, decoded)
// NEW!!! It will be a Uint8Array (Like a bytes array buffer)
var encoded = SuperJSONatural().pack(data);
var decoded = SuperJSONatural().unpack(encoded);
console.log(data, encoded, decoded)
FAQs
SuperJSONatural ⚡⚡⚡ < ~9kB | JSON or Buffer with TypedArray, faster than CBOR & JSON and msgpackr in some case.
We found that superjsonatural 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.

Product
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.

Research
/Security News
Malicious npm packages use Adspect cloaking and fake CAPTCHAs to fingerprint visitors and redirect victims to crypto-themed scam sites.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.