json · v1.0 · 2026-07-20 · sha256 9607f080bc6feeed
json v1.0A
Immutable. This exact content never changes and is served at /api/v1/blob/9607f080bc6feeed.
---
name: json
description: Data format.
license: MIT
metadata:
author: vant
version: "1.0"
---
# JSON
> Data format.
---
## When To Use
- APIs
- Config files
- Data interchange
---
## What To Do
### 1. Syntax
```json
{
"key": "value",
"number": 42,
"boolean": true,
"null": null,
"array": [1, 2, 3],
"object": {
"nested": "value"
}
}
```
### 2. Parse
```javascript
// JavaScript
const data = JSON.parse(string)
const string = JSON.stringify(data, null, 2)
```
### 3. Validate
```bash
# Python
python -c "import json; json.load(open('f.json'))"
# Node
node -e "JSON.parse(require('fs').readFileSync('f.json'))"
```
### 4. Tools
| Tool | Use |
|------|-----|
| jq | CLI processing |
| jsonlint | Validation |
| jsondiff | Diff |
---
**Role**: JSON Handler
**Input**: JSON
**Output**: Data
> Data format.