Repair malformed JSON strings — fix single quotes, trailing commas, missing quotes, unclosed brackets, and more. Returns the repaired, parseable JSON.