Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
json-format-tool
Advanced tools
Okay, this is a tiny cli-tool for format JSON.
First install
npm i -g json-format-tool
And if we have a not pretty JSON file like this one.
{
"foo": "foo",
"bar": { "x": "我", "z": 234, "y": 345 },
"baz": [3, 2, { "b": 234, "a": 123 }]
}
We can format it.
json-format-tool demo.json
It will output
{
"bar": {
"x": "我",
"y": 345,
"z": 234
},
"baz": [
3,
2,
{
"a": 123,
"b": 234
}
],
"foo": "foo"
}
It's much pretty now.
And if you want format some mutable JSON such as HTTP request, you can use the pipe operator.
curl -X GET http://127.0.0.1:3000/my-api | json-format-tool
Other options you can check inside the cli tool.
json-format-tool -h
Usage: json-format-tool [options] <json-file> OR <output-json> | json-format-tool
Options:
-v, --version output the version number
-r, --replace replace the file directly, only works in <json-file> mode
-i, --indent <num> indent for json (default: 2)
--no-sort not need sort keys
-h, --help output usage information
Sort JSON keys based on json-stable-stringify.
FAQs
Tiny JSON formatter!
The npm package json-format-tool receives a total of 29 weekly downloads. As such, json-format-tool popularity was classified as not popular.
We found that json-format-tool 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.