Browse Source

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

master
Shadowfacts 1 year ago
parent
commit
63d3d0764f
Signed by: shadowfacts GPG Key ID: 94A5AB95422746E5
  1. 4
      MongoView/JSONPrettyPrinter.swift

4
MongoView/JSONPrettyPrinter.swift

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

Loading…
Cancel
Save