Fix 0/1 in JSON getting pretty-printed as booleans

This commit is contained in:
Shadowfacts 2020-08-26 11:00:35 -04:00
parent c5dd7e277a
commit 63d3d0764f
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 1 additions and 3 deletions

View File

@ -64,10 +64,8 @@ class JSONPrettyPrinter {
strings.append("\n\(currentIndent)]") strings.append("\n\(currentIndent)]")
} else if let str = object as? String { } else if let str = object as? String {
strings.append("\"\(escape(str))\"") strings.append("\"\(escape(str))\"")
} else if let bool = object as? Bool {
strings.append(bool.description)
} else if let num = object as? NSNumber { } else if let num = object as? NSNumber {
strings.append(num.description) strings.append(num.stringValue)
} else if object is NSNull { } else if object is NSNull {
strings.append("null") strings.append("null")
} else { } else {