JSON Forge
100% Client-Side: your data is never sent to a server

JSON examples

package.json Example

package.json describes a Node.js project: its name, version, scripts and dependencies. This example is a realistic small web project, with every field explained.

Loading editor…
Paste or type JSON on the left to explore it as a tree.
Empty🔒 Processed locally in your browser

The example

The JSON above is the example. Explore it in the Tree tab, press Download to save it as a .json file, or Share to send someone a link to it. All names, ids, emails and values are invented.

Fields explained

PathTypeNotes
name / versionstringThe package identity. Version numbers follow semantic versioning: major.minor.patch.
privatebooleantrue prevents accidentally publishing the package to npm.
scriptsobjectNamed commands you run with npm run <name>.
dependenciesobjectPackages needed at runtime. The ^ prefix allows compatible minor and patch updates.
devDependenciesobjectTools needed only for development and builds.
enginesobjectWhich Node.js versions the project supports.

Read it in code

JavaScript:

import pkg from "./package.json" with { type: "json" };
console.log(pkg.version);

Python:

import json
version = json.load(open("package.json"))["version"]

What this example is good for

Tips

Convert this example

Open it in a converter, then switch the output in the Code tab:

More examples

All JSON examples · Cheat sheets