Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

json

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json

a 'json' command for massaging and processing JSON on the command line

  • 9.0.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
156K
increased by20.86%
Maintainers
1
Weekly downloads
 
Created

What is json?

The 'json' npm package provides a simple command-line tool for working with JSON data. It allows users to easily manipulate JSON objects, extract specific fields, and format JSON data in a readable way.

What are json's main functionalities?

Extracting specific fields

This feature allows you to extract specific fields from a JSON file. In this example, it extracts the 'name' field from 'data.json'.

json -f data.json name

Pretty-printing JSON

This feature formats JSON data in a readable way with indentation. The '-i' flag is used to pretty-print the JSON content of 'data.json'.

json -i data.json

Updating JSON data

This feature allows you to update JSON data directly from the command line. The '-I' flag is used to modify the file in place, and the '-e' flag is used to execute the provided JavaScript expression to update the 'name' field.

json -I -f data.json -e 'this.name="newName"'

Other packages similar to json

Keywords

FAQs

Package last updated on 03 Mar 2017

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc