Skip to content

Commit 3838085

Browse files
docs(website): add json diff documentation (#723)
1 parent 2017404 commit 3838085

File tree

5 files changed

+107
-21
lines changed

5 files changed

+107
-21
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ A calculator-style notebook for natural-language calculations, conversions, and
112112

113113
Built-in utilities for the small tasks that usually send you to a browser tab:
114114

115+
- **Compare:** JSON Diff
115116
- **Text:** Case Converter, Slug Generator, URL Parser
116117
- **Crypto:** Hash/HMAC Generator, Password Generator, UUID
117118
- **Encoders:** URL, Base64, JSON to TOML/XML/YAML, Color Converter

docs/website/.vitepress/config.mts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ export default defineConfig({
138138
{
139139
text: 'Tools',
140140
items: [
141-
{ text: 'Developer Tools', link: '/documentation/tools/' },
141+
{ text: 'Overview', link: '/documentation/tools/' },
142+
{ text: 'JSON Diff', link: '/documentation/tools/json-diff' },
142143
],
143144
},
144145
],

docs/website/documentation/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Documentation Overview
3-
description: "Explore the massCode documentation for code snippets, markdown notes, math notebook, storage, sync, themes, and built-in developer tools."
3+
description: "Explore the massCode documentation for code snippets, markdown notes, math notebook, storage, sync, themes, JSON Diff, and built-in developer tools."
44
---
55

66
# Overview
@@ -25,7 +25,7 @@ Math is a calculator-style notebook for quick development math without leaving m
2525

2626
## Tools
2727

28-
Tools covers the small one-off tasks that usually send you to a browser tab: encoders, decoders, generators, hash utilities, and text converters. Categories are listed on the left, and the active tool opens on the right.
28+
Tools covers the small one-off tasks that usually send you to a browser tab: JSON comparison, encoders, decoders, generators, hash utilities, and text converters. Categories are listed on the left, and the active tool opens on the right.
2929

3030
## General Settings
3131

Lines changed: 62 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,82 @@
11
---
2-
title: Developer Tools
3-
description: "Use built-in developer tools in massCode for text conversion, hashing, HMAC generation, URL parsing, and other quick tasks."
2+
title: Overview
3+
description: "Use built-in developer tools in massCode for JSON diffing, text conversion, hashing, HMAC generation, URL parsing, and other quick tasks."
44
---
55

6-
# Developer tools
6+
# Tools overview
77

88
<AppVersion text=">=3.8" />
99

10-
Tools is for the small developer tasks that should take seconds, not a trip to a random website. Use it when you need to convert, encode, hash, or generate something quickly without leaving massCode.
10+
Tools is for the small developer tasks that should take seconds, not a trip to a random website. Use it when you need to compare JSON, convert, encode, hash, or generate something quickly without leaving massCode.
1111

1212
The available tools are grouped by category:
1313

14+
## Compare
15+
16+
### [JSON Diff](/documentation/tools/json-diff)
17+
18+
Compare two JSON documents side by side with validation, filters, and a tree diff for nested changes.
19+
1420
## Text tools
1521

16-
- Case Converter
17-
- Slug Generator
18-
- URL Parser
22+
### Case Converter
23+
24+
Convert text between common casing formats such as camelCase, snake_case, kebab-case, and uppercase.
25+
26+
### Slug Generator
27+
28+
Turn free-form text into a URL-friendly slug.
29+
30+
### URL Parser
31+
32+
Split a URL into its protocol, host, path, query, and hash parts.
1933

2034
## Cryptography & Security
2135

22-
- Hash Generators
23-
- HMAC Generators
24-
- Password Generators
25-
- UUID Generators
36+
### Hash Generators
37+
38+
Generate one-way hashes from text input.
39+
40+
### HMAC Generators
41+
42+
Build keyed message authentication hashes from a secret and a message.
43+
44+
### Password Generators
45+
46+
Generate random passwords with configurable character sets.
47+
48+
### UUID Generators
49+
50+
Create unique identifiers for fixtures, payloads, and test data.
2651

2752
## Encoders & Decoders
2853

29-
- URL
30-
- Base64
31-
- JSON ⇄ TOML/XML/YAML
32-
- Text ⇄ ASCII/Binary/Unicode
33-
- Color Converter
54+
### URL
55+
56+
Encode or decode URL strings safely.
57+
58+
### Base64
59+
60+
Convert plain text to and from Base64.
61+
62+
### JSON ⇄ TOML/XML/YAML
63+
64+
Transform JSON between common structured data formats.
65+
66+
### Text ⇄ ASCII/Binary/Unicode
67+
68+
Convert text into different low-level or escaped representations and back.
69+
70+
### Color Converter
71+
72+
Translate color values between supported formats.
3473

3574
## Generators
3675

37-
- JSON Generator
38-
- Lorem Ipsum Generator
76+
### JSON Generator
77+
78+
Build mock JSON payloads with typed fields for testing and demos.
79+
80+
### Lorem Ipsum Generator
81+
82+
Generate placeholder words, sentences, or paragraphs.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
title: JSON Diff
3+
description: "Compare two JSON documents side by side in massCode with validation, filters, and a tree diff."
4+
---
5+
6+
# JSON Diff
7+
8+
<AppVersion text=">=5.1" />
9+
10+
JSON Diff lets you compare two JSON documents side by side without leaving massCode. It is useful for checking API responses, fixture changes, configuration edits, and generated JSON payloads.
11+
12+
## Where to find it
13+
14+
Open **Tools** in the left rail, then go to **Compare****JSON Diff**.
15+
16+
## What it does
17+
18+
- Shows the original and modified JSON in two editors
19+
- Validates each side independently
20+
- Formats valid JSON on paste and blur
21+
- Builds a tree-based diff for nested objects and arrays
22+
- Highlights added, removed, and modified values
23+
- Filters the diff by change type
24+
- Keeps both input editors scrolled in sync
25+
- Uses the same editor font settings as the main code editor
26+
27+
## How to use it
28+
29+
1. Paste the original JSON into the left editor.
30+
2. Paste the modified JSON into the right editor.
31+
3. Review the diff tree below the editors.
32+
4. Use the checkboxes to focus on added, removed, or modified nodes.
33+
5. Expand or collapse nested objects and arrays as needed.
34+
35+
## Notes
36+
37+
- Both inputs must contain valid JSON before the diff viewer appears.
38+
- Validation errors are shown under each editor separately.
39+
- If only one side is filled, the tool stays in the empty state instead of guessing missing data.
40+
- Array move visualization is not exposed as a separate state. In this version, the tool prefers predictable output over compact move semantics.

0 commit comments

Comments
 (0)