Fix 0/1 in JSON getting pretty-printed as booleans
This commit is contained in:
parent
c5dd7e277a
commit
63d3d0764f
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue