JsonComparator is a small utility class that compares two JSON objects (as strings) and returns structured differences. Ideal for building human-friendly or machine-readable logs when objects change.
JsonComparator
Common uses:
Support / Audit logsRecord what fields changed and their before/after values.
Change notificationsInclude the HTML render ready description in email or UI notifications to show what changed.
Webhook payload comparisonVerify delta between old and new payloads for idempotency checks.
Regression / integration testsDetect unexpected changes in API responses or config objects.
Simple step-by-step how to use and configure.1. Add JsonComparator public elements to your app2. Feed it two JSON strings (PrevJson = Original value of the JSON, NewJson = Changed value of the JSON)GetJsonDifferences sample usage
GetJsonDifferences result in a list widget
GetOperationDetails sample usage
GetOperationDetails result rendered using HTMLinject
What to expect
If a field is added: OriginalValue = "", NewValue = "value".
OriginalValue = ""
NewValue = "value"
If a field is removed: OriginalValue = "value", NewValue = "".
OriginalValue = "value"
NewValue = ""
If a field changed: OriginalValue = "old", NewValue = "new".
OriginalValue = "old"
NewValue = "new"
Property name matching is case-insensitive (Name == name).
Name
name
Arrays are compared element-by-element (order matters).
Nested objects/arrays: OriginalValue / NewValue will contain the raw JSON text for that value.
OriginalValue
NewValue