daily pastebin goal
69%
SHARE
TWEET

Untitled

a guest Dec 7th, 2017 45 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
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top