diff --git a/ProjectUtilities/Classes/CommonUtilities.swift b/ProjectUtilities/Classes/CommonUtilities.swift index 7b968a8..1f43db7 100644 --- a/ProjectUtilities/Classes/CommonUtilities.swift +++ b/ProjectUtilities/Classes/CommonUtilities.swift @@ -1219,7 +1219,8 @@ class CommonUtilities: NSObject { guard range.lowerBound <= str.count && range.upperBound <= str.count else { return nil } - return Range(str.index(str.startIndex, offsetBy: range.lowerBound).. UIImage? { diff --git a/ProjectUtilities/Classes/NetworkLibrary.swift b/ProjectUtilities/Classes/NetworkLibrary.swift index 406fa1d..60c3588 100644 --- a/ProjectUtilities/Classes/NetworkLibrary.swift +++ b/ProjectUtilities/Classes/NetworkLibrary.swift @@ -88,6 +88,13 @@ enum ServiceResponse { let session = URLSession.shared let task = session.dataTask(with: request) { (data, response, error) -> Void in + do { + let temp = try JSONSerialization.jsonObject(with: data!, + options: JSONSerialization.ReadingOptions.allowFragments) + } catch { + print(error) + } + if let httpResponse = response as? HTTPURLResponse, httpResponse.statusCode == 200, let responseData = data {