Open Cap Table Protocol Canton SDK - v0.2.224
    Preparing search index...

    Function diffOcfObjects

    • Generate detailed diffs between two OCF objects with normalization.

      Uses the same normalization logic as ocfCompare (isUndefinedLike, normalizeOcfValue) but produces simplified human-readable diff strings instead of a structured result.

      Note: Unlike ocfCompare, this function does not support ignoredFields or deprecatedFields options. Use ocfCompare with reportDifferences: true if you need field filtering.

      Parameters

      • a: unknown

        First object (typically ledger/source data)

      • b: unknown

        Second object (typically database/destination data)

      • path: string = ''

        Current path in the object tree (for recursive calls)

      Returns string[]

      Array of diff descriptions

      const diffs = diffOcfObjects(ledgerData, dbData);
      if (diffs.length > 0) {
      console.log('Differences found:', diffs);
      }