I seem to be experiencing an issue that if there is no JSON and I try to check if a key exists in the JSON, it returns true. Below is a code example from one of my alamofire network calls that returns a 204 no content
case .Success:
if let value = response.result.value {
let json = JSON(value)
if json["scott"].isExists() {
print("FOUND YOU SCOTT 👋🏽👋🏽👋🏽👋🏽👋🏽👋🏽👋🏽")
}
}
}
I can handle this in my code but it seems like bug to me if isExists() returns true when no JSON even exists, let alone the key you are checking for.
I seem to be experiencing an issue that if there is no JSON and I try to check if a key exists in the JSON, it returns
true. Below is a code example from one of my alamofire network calls that returns a204 no contentI can handle this in my code but it seems like bug to me if
isExists()returns true when no JSON even exists, let alone the key you are checking for.