Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ jobs:
- name: Test cron parsing and schedule evaluation
run: node --test scripts/crontab.test.cjs

- name: Test JSON and YAML comparison
run: node --test scripts/json-diff.test.cjs

- name: Validate HTML
uses: Cyb3r-Jak3/html5validator-action@v7.2.0
with:
Expand All @@ -51,6 +54,7 @@ jobs:
kubernetes-rbac-explorer/index.html
visual-subnet-calculator/index.html
yaml-formatter/index.html
json-diff/index.html
crontab/index.html
terraform-modules/index.html
fail: true
Expand All @@ -76,5 +80,6 @@ jobs:
http://127.0.0.1:8080/kubernetes-rbac-explorer/
http://127.0.0.1:8080/visual-subnet-calculator/
http://127.0.0.1:8080/yaml-formatter/
http://127.0.0.1:8080/json-diff/
http://127.0.0.1:8080/crontab/
http://127.0.0.1:8080/terraform-modules/
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,50 @@ The shorter `/json-formatter/` alias redirects to this tool.
YAML parsing and serialization use the vendored `js-yaml` 4.1.0 browser
bundle, distributed under the MIT license included with the tool.

## JSON & YAML Diff Checker

Open `/json-diff/` to compare JSON, JSON-compatible YAML, or one of each entirely
in the browser. Structural comparison ignores object key order, formatting, and
YAML comments, and reports added, removed, and changed values by field path.
Arrays can compare by position, as unordered multisets, or by a unique direct
object field. Kubernetes mode matches multi-document YAML or JSON resource
arrays by API version, kind, namespace, and name.

The page reuses the formatter's header/footer markup, theme stylesheet, and
vendored MIT-licensed js-yaml parser. Inputs are never uploaded or persisted.
File import, individual format selection, formatting, swapping, filtering,
copying, and complete JSON report downloads work locally. Editing inputs or
comparison options invalidates the previous report immediately. Live comparison
refreshes after a short typing pause and can be switched off for manual reviews.
Editable source views highlight the affected lines and values, with matching
gutter markers, live counts, Previous/Next navigation, and Alt+Up/Down shortcuts.
Source locations follow JSON/YAML structure, keyed arrays, aliases, and reordered
Kubernetes resources. Only the visible editor lines are rendered in the highlight
layer so long documents remain practical to navigate.
Results offer side-by-side and unified layouts, syntax coloring, inline value
highlights, and readable Kubernetes resource labels alongside the original
report paths.

Each input is limited to 1 MiB, 80 nesting levels, and 50,000 expanded values;
expanded text is capped at 4 MiB and reports at 2,000 changes. Duplicate mapping
keys, recursive aliases, non-finite numbers, and unsafe integers are rejected.
Numbers otherwise use JavaScript precision. Match paths are descriptive report
labels, not JSON Patch operations. Large value previews are shortened; exports
retain complete values.

Run the comparison regression tests:

```sh
node --test scripts/json-diff.test.cjs
```

The page includes indexable JSON and YAML examples, instructions, FAQs, section
navigation, related-tool links, and connected page/application/author/image
structured data. `python3 scripts/seo-audit.py` checks metadata agreement,
canonical URLs, schema relationships, examples, incoming links, and sitemap
dates. Follow the JSON diff section in [`SEARCH_CONSOLE.md`](./SEARCH_CONSOLE.md)
after deployment to inspect indexing and measure search performance.

## Kubernetes RBAC Explorer

Open `/kubernetes-rbac-explorer/` to turn Kubernetes Roles and bindings into
Expand Down Expand Up @@ -226,6 +270,7 @@ python3 -m http.server 8080
- `http://localhost:8080/kubernetes-rbac-explorer/`
- `http://localhost:8080/visual-subnet-calculator/`
- `http://localhost:8080/yaml-formatter/`
- `http://localhost:8080/json-diff/`
- `http://localhost:8080/crontab/`
- `http://localhost:8080/terraform-modules/`

Expand Down
30 changes: 30 additions & 0 deletions SEARCH_CONSOLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ invented or replaced with a placeholder.
- `https://native-cube.com/kubernetes-rbac-explorer/`
- `https://native-cube.com/visual-subnet-calculator/`
- `https://native-cube.com/yaml-formatter/`
- `https://native-cube.com/json-diff/`
- `https://native-cube.com/crontab/`
- `https://native-cube.com/terraform-modules/`
4. Do not submit `/json-formatter/`; it is a redirect alias.
Expand Down Expand Up @@ -173,6 +174,35 @@ workflow. Shared schedules remain URL fragments and retain the same clean
canonical, following Google's
[canonicalization guidance](https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls).

## Check and measure the JSON and YAML diff page

After publishing `/json-diff/`:

1. Inspect `https://native-cube.com/json-diff/` with **Test live URL**. Confirm an
indexable HTTP 200 response and the exact canonical URL with its trailing
slash. Submit that canonical URL for indexing after the live checks pass.
2. Check the original HTML and the rendered page. The heading, comparison
instructions, JSON and YAML examples, FAQ, related tools, and ordinary
navigation links are static HTML. Only comparison and highlighting require
JavaScript. Confirm that the live editor still works on desktop and mobile.
3. Validate the linked `WebPage`, `WebApplication`, `BreadcrumbList`, `Person`,
and `ImageObject` entities with the
[Schema Markup Validator](https://validator.schema.org/) and
[Rich Results Test](https://search.google.com/test/rich-results). Keep the
feature list accurate. The page does not publish ratings or reviews; do not
invent them to remove rich-result eligibility warnings.
4. In the Search Console performance report, filter to the exact page URL.
Monitor impressions, clicks, CTR, and position for JSON diff, JSON compare,
YAML diff, compare YAML files, and Kubernetes manifest comparison queries.
These are query groups to investigate, not verified search volumes or
ranking predictions. Check actual indexing and selected canonical in Search
Console; passing local checks cannot establish either.
5. Keep `WebPage.dateModified` and sitemap `lastmod` aligned when content changes.
The local SEO audit enforces their agreement, page and social metadata,
schema relationships, static examples, and incoming links from the homepage
and formatter. Run `python3 scripts/check-redirects.py` after deployment to
verify the published redirects and canonical destinations.

## Keep sitemap dates accurate

Update a page's `lastmod` when its public content or metadata changes. The
Expand Down
Binary file added assets/social/json-diff.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions assets/social/json-diff.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading