/** * Attempt to close an incomplete JSON object string by auto-closing braces * and completing any unclosed double-quoted string values. * * Strategy: * 1. Compute origOpen from the ORIGINAL input (how many braces are unclosed). * 2. Add that many closing braces. If result is now valid JSON → return it. * 3. If still invalid: trim trailing whitespace, strip trailing backslash. * 4. Walk backwards to detect an unclosed string value. * - Quote followed by `:` → key-name, skip * - Quote followed by `,` `}` or end-of-string → toggle in/out of string * 5. If we end INSIDE a string (unclosed opening `"`), append `"` + origOpen `}`. * * Known limitations: * - Strings whose content ends with a `"` character cannot be repaired * (algorithm can't distinguish content-`"` from string-terminator `"`). * - Input ending in bare `:` (incomplete value expression) can't be meaningfully repaired. * - Bare `{` returns unchanged. * - If origOpen=0 (braces balanced) but string is unclosed, repair is skipped * (the input would be valid JSON per JSON.parse, so it's returned as-is). */ export declare function completePartialObject(s: string): string; //# sourceMappingURL=json-repair.d.ts.map