
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
json-buffer
Advanced tools
The json-buffer npm package is designed to serialize and deserialize JSON data that includes binary Buffers. Normally, JSON.stringify() will lose the Buffer information, converting Buffers to objects. json-buffer preserves the Buffer data by encoding it as a base64 string when serializing and then decoding it back to a Buffer when deserializing.
Serialization
Converts a JavaScript object with Buffers into a JSON string, encoding Buffers as base64 strings.
{"data":"VGhpcyBpcyBhIHRlc3QgYnVmZmVy"}
Deserialization
Parses a JSON string that contains base64 encoded Buffers, converting them back into Buffer objects.
{"type":"Buffer","data":[84,104,105,115,32,105,115,32,97,32,116,101,115,116,32,98,117,102,102,101,114]}
buffer-json is similar to json-buffer in that it allows for serialization and deserialization of Buffer objects within JSON data. It differs in the way it encodes and decodes the Buffers, potentially using a different approach or algorithm.
JSON functions that can convert buffers!
JSON mangles buffers by converting to an array... which isn't helpful. json-buffers converts to base64 instead, and deconverts base64 to a buffer.
var JSONB = require('json-buffer')
var Buffer = require('buffer').Buffer
var str = JSONB.stringify(Buffer.from('hello there!'))
console.log(JSONB.parse(str)) //GET a BUFFER back
MIT
FAQs
JSON parse & stringify that supports binary via bops & base64
The npm package json-buffer receives a total of 41,146,794 weekly downloads. As such, json-buffer popularity was classified as popular.
We found that json-buffer 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
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.