Output:
({
"Client Characteristic Configuration" = <41424344 45463132 31323334 35363738 45324441>;
})
Code :
print("localName4", localName4)
if (localName4 != nil) {
print("exists")
if localName4 is Dictionary<AnyHashable,Any> {
print("Yes, it's a Dictionary")
do {
if let jsonResult = try JSONSerialization.jsonObject(with: localName4 as! Data, options: []) as? NSDictionary {
print(jsonResult)
}
} catch let error as NSError {
print(error.localizedDescription)
}
}
}
I am trying get value <41424344 45463132 31323334 35363738 45324441>
from result. When I try to parse the value getting exception:
Could not cast value of type 'NSDictionaryM' to 'NSData'