Both inputs must be valid JSON before structural comparison has meaning
Comments, trailing commas, single quotes, NaN, undefined, and duplicate-key behavior are common sources of confusion. Validate and beautify both sides first. Parsers typically keep only one value for a duplicate object key, so fix ambiguous input before relying on a diff report.