Browse Source

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

master
Shadowfacts 9 months ago
parent
commit
63d3d0764f
Signed by: shadowfacts GPG Key ID: 94A5AB95422746E5
1 changed files with 1 additions and 3 deletions
  1. +1
    -3
      MongoView/JSONPrettyPrinter.swift

+ 1
- 3
MongoView/JSONPrettyPrinter.swift View File

@ -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