daily pastebin goal
3%
SHARE
TWEET

Untitled

a guest Dec 7th, 2017 44 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. func convertToDictionary(text: String) -> [String: Any]? {
  2.     if let data = text.data(using: .utf8) {
  3.         do {
  4.             return try JSONSerialization.jsonObject(with: data, options: []) as? [String: Any]
  5.         } catch {
  6.             print(error.localizedDescription)
  7.         }
  8.     }
  9.     return nil
  10.     }
RAW Paste Data
Top