macOS client parity review
This commit is contained in:
@@ -780,12 +780,3 @@ private func resultText(_ content: (any Sendable)?) -> String {
|
||||
}
|
||||
return prettyJSON(content)
|
||||
}
|
||||
|
||||
private func compactJSON(_ v: (any Sendable)?) -> String {
|
||||
let encoder = JSONEncoder()
|
||||
encoder.outputFormatting = [.sortedKeys, .withoutEscapingSlashes]
|
||||
guard let container = try? OpenAPIValueContainer(unvalidatedValue: v), let data = try? encoder.encode(container) else {
|
||||
return String(describing: v)
|
||||
}
|
||||
return String(decoding: data, as: UTF8.self)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user