pipr.tools

json-minify

Minify JSON

⟐ Data

Try it

stdin0 chars
stdout0 chars

Example

Minify a formatted JSON object

Usage
$ echo "{
  "name": "Alice",
  "age": 30
}" | json-minify
View source
(input) => {
      try {
        return JSON.stringify(JSON.parse(input));
      } catch (e) {
        return `Error: ${e.message}`;
      }
    }

Suggested Pipelines

Related Tools