You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, I will to yaml, I get a error Failed to represent 1:
private func represent(_ value: Any) throws -> Node {
if let representable = value as? NodeRepresentable { // The NSNumber is not NodeRepresentable
return try representable.represented()
}
throw YamlError.representer(problem: "Failed to represent \(value)")
}
I test some code:
(lldb) po value
1
(lldb) po type(of: value)
__NSCFBoolean
(lldb) po value is Bool
true
(lldb) po value is NSNumber
true
(lldb) po value is NodeRepresentable
false
I think the __NSCFBoolean is not Bool, so it does not extension the NodeRepresentable.
The text was updated successfully, but these errors were encountered:
I have a json string:
I get a hash with the
JSONSerialization
class:Now, I will to yaml, I get a error
Failed to represent 1
:I test some code:
I think the __NSCFBoolean is not Bool, so it does not extension the NodeRepresentable.
The text was updated successfully, but these errors were encountered: