Вы можете использовать следующие регулярные замены, чтобы очистить строку и сделать ее json совместимой
//Surround keys with quotes
let firstStep = input.replacingOccurrences(of: #"\s(\w+):{1}"#,
with: #""$1":"#,
options: .regularExpression)
//Fix status value
let json = firstStep.replacingOccurrences(of: "'", with: "\"")