Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Assert JSON Equals

quality.assert_json_equals

ProductionBounded custom (Class B)Deterministicstrictfastv1.0.0
No network

Overview

You give us the value you expected and the one you got, and we tell you exactly where they part company — one finding per spot, each with a JSON pointer you can read. You decide what counts as equal: whether key order matters, whether array order matters, how much numeric drift you tolerate, whether a null is the same as a missing key, which paths to skip entirely, and which paths only have to look like a UUID or a timestamp rather than match. Nothing is guessed and nothing is repaired, so the same pair always produces the same answer.

A test that asks a model whether two payloads look the same gives you a different answer on a bad day, and a plain equality check gives you "not equal" without telling you where.

Reliability

The same pair and the same options always give the same findings, in the same order, and nothing leaves the platform. Two behaviours are worth knowing. A path in ignoredPaths or dynamicPathRules has to match exactly — it is not a prefix, so "/items" does not cover "/items/0/id" — and an ignored path takes everything beneath it with it. And when maxMismatches is reached we stop walking, so both the list and the counts in summary are incomplete; _meta.truncated tells you when that happened, and raising maxMismatches gives you the rest. Unequal values are a normal successful answer, not a failure. Two failures do stop the call, both because the options need fixing rather than the data — INVALID_JSON_POINTER means a path in ignoredPaths or dynamicPathRules is not a JSON pointer, so write "" for the root or start it with a slash, and DYNAMIC_RULE_UNSUPPORTED means a rule name is not one of uuid, iso_datetime, non_empty_string, integer, number, or any. Both name the offending value, and retrying unchanged will fail identically.

Context footprint

The reply grows with the number of differences, and each one carries both values by default — set includeValues false, or lower maxMismatches, when the payloads are large. A successful call costs 1 execution credit.

When to use it

When you need a yes or no on two JSON values, plus the reason when it is no.

When the value needs validating against a schema or fixing before it parses.

Scope

Note
We compare two JSON values by rules you set and list every difference.

Non-goals

  • Does not repair or reformat either value before comparing
  • Does not check either value against a schema
  • Does not judge whether two different values mean the same thing
  • Does not coerce types the way JavaScript would, so 1 never equals "1"

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

analysisvalidation

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input1.9 MB

How we handle your data

Sensitive input, safe output
What this means

This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.

Squillify guarantees
  • Runs inside Squillify
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • Squillify does not permanently store submitted payloads.
  • Telemetry records metadata only, not submitted content.
  • Submitted payloads are not used for training.
  • Submitted payloads are not reviewed by humans.
  • This skill does not target sensitive data.
  • The response does not contain submitted content.
Your responsibility

Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
expectedobjectYesJSON value you expected — object, array, string, number, boolean or null; a string is parsed as JSON when it can be.
actualobjectYesJSON value you actually got, in the same shapes as expected; reporting is from this value's point of view.
optionsobjectNoClosed equality rules covering key order, array order, numbers, nulls, ignored pointers, dynamic path rules, mismatch cap and whether values are echoed; omit the object for the published defaults.

Output schema

FieldTypeRequiredDescription
equalbooleanYesTrue when mismatches came back empty under the chosen rules.
mismatchesarrayYesDifferences in walk order, 0 through 1000 closed objects with code and path.
summaryobjectYesClosed counts of every difference found, including those beyond maxMismatches: missing, unexpected, different and ignored.
_metaobjectYesClosed bookkeeping with the comparison profile name and whether the walk stopped at maxMismatches.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"quality.assert_json_equals","input":{"expected":{"a":1},"actual":{"a":1}}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("quality.assert_json_equals", {"actual":{"total":11},"expected":{"total":10}});

Errors

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.
INVALID_JSON_POINTER400NoThe request payload failed this skill's input validation.
DYNAMIC_RULE_UNSUPPORTED400NoThe skill does not support the requested variant.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not repair or reformat either value before comparing
  • Does not check either value against a schema
  • Does not judge whether two different values mean the same thing
  • Does not coerce types the way JavaScript would, so 1 never equals "1"
  • Fixing JSON that will not parse
  • Checking a payload against a schema

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "quality.assert_json_equals",
  "input": {
    "actual": {
      "total": 11
    },
    "expected": {
      "total": 10
    }
  }
}

Examples

One number is off, and the report says by how much

Inputjson
{
  "actual": {
    "total": 11
  },
  "expected": {
    "total": 10
  }
}
Expected outputjson
{
  "equal": false,
  "mismatches": [
    {
      "details": {
        "info": "difference=1"
      },
      "actual": 11,
      "path": "/total",
      "code": "VALUE_MISMATCH",
      "expected": 10
    }
  ],
  "summary": {
    "missing": 0,
    "unexpected": 0,
    "different": 1,
    "ignored": 0
  },
  "_meta": {
    "truncated": false,
    "comparisonProfile": "json-equality-1"
  }
}

Two values that match exactly

Inputjson
{
  "actual": {
    "a": 1
  },
  "expected": {
    "a": 1
  }
}
Expected outputjson
{
  "equal": true,
  "mismatches": [],
  "summary": {
    "missing": 0,
    "unexpected": 0,
    "different": 0,
    "ignored": 0
  },
  "_meta": {
    "truncated": false,
    "comparisonProfile": "json-equality-1"
  }
}
  • Check an API response matches what your test expects
  • Compare two payloads while letting ids and timestamps vary
  • Confirm a transformation changed only what it was meant to change

Avoid for

  • Fixing JSON that will not parse
  • Checking a payload against a schema

Composable with

Safety & privacy

  • Runs without calling any external service.
  • Your payloads are never stored permanently.
  • Telemetry captures metadata only — never your payload contents.
  • We never train models on your payloads.
  • No human reviews your payloads.

Tags

qualityjsonvalidation