Nodes/Crystools/πŸͺ› JSON comparator
ComfyUI Node Runs on cloud

πŸͺ› JSON comparator

Diff any two JSONs, not just image metadata

By crystianΒ·Created 3 years agoΒ·Updated 10 months agoΒ· 1,946
πŸͺ› JSON comparator
  • json_old
  • json_new
  • json_compared

This is the node actually documented in the Crystools README under Utils, and it's a deliberately dumb, deliberately general tool: two JSON objects go in, a diff comes out. That's it. If Metadata comparator is the specialist that knows how to read an image's Prompt/Workflow/Fileinfo, JSON comparator is the generalist that doesn't care what your JSON represents at all - a config file, an API response you loaded in, another node's diff output, anything.

Worth knowing if the node picker throws a near-identical Json comparator (lowercase) at you too: that's not a mistake on your part, it's a fossil of the pack's own version history. Crystools 1.25.3 renamed nodes to lowercase, and 1.27.0 reverted it because the registry wouldn't let the name fully roll back. Functionally the two are the same node - grab whichever one your search turned up.

How it works

The author's own framing in the README draws the line clearly: Metadata comparator is "intentionally simple to compare two images metadata," while this one is "more generic" and works on any JSON, not only metadata. It walks both inputs and reports what's different between them.

The inputs and outputs that matter

  • json_old - the first JSON, your reference point.
  • json_new - the second, what you're checking against the first.
  • Output: json_compared - the diff as a JSON object. It's an output node, so the result renders directly on the node in the UI, and because the output is JSON-typed it also chains into JSON extractor if you just want one field out of the diff rather than reading the whole thing.

How to install it

Standard Crystools install. Through ComfyUI Manager: search crystools, install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/crystian/comfyui-crystools.git
cd comfyui-crystools
pip install -r requirements.txt

Find it under crystools πŸͺ› / Utils after restarting. Pure Python/JS utility - no models, no GPU requirement for this node.

Common issues & troubleshooting

The recurring source of confusion isn't really a bug in the node, it's the duplicate registration described above - if you're following an older workflow JSON or a tutorial screenshot and the node it references won't load, check whether it's asking for the lowercase Json comparator variant instead; both work identically, so swapping one for the other is safe.

Functionally, the thing to get right is feeding it actual JSON-typed connections - plain strings won't plug into json_old or json_new, so if your data is coming from a text widget or a raw string output elsewhere in your graph, you'll need to get it into JSON shape first. And because this node (like Metadata comparator) reports differences in DeepDiff-style categories rather than a flat list, a comparison between two large or deeply nested objects can produce a diff that's technically correct but dense to read straight off the canvas - worth extracting the one field you actually care about downstream rather than parsing the whole thing by eye.

Categorycrystools πŸͺ›/Utils

Inputs (2)

NameTypeDefaultDescription
json_oldJSONβ€”
json_newJSONβ€”

Outputs (1)

NameTypeDescription
json_comparedJSONβ€”