   let lastName: String
   let pictureRawURL: String
 
-  init?(json: [String:Any]) {
+  init?(json: JSON) {
     guard
-      let fbid = json["id"] as? String,
-      let displayName = json["name"] as? String,
-      let firstName = json["first_name"] as? String,
-      let lastName = json["last_name"] as? String,
-
-      let picture = json["picture"] as? [String:Any],
-      let picture_data = picture["data"] as? [String:Any],
-      let picture_url = picture_data["url"] as? String
+      let fbid = json["id"]?.stringValue,
+      let displayName = json["name"]?.stringValue,
+      let firstName = json["first_name"]?.stringValue,
+      let lastName = json["last_name"]?.stringValue,
+      let picture_url = json["picture"]?["data"]?["url"]?.stringValue
     else { return nil }
 
     self.fbid = fbid

    request.start { (response, result) in
      switch result {
      case .success(let response):
        if let deserialised = response.dictionaryValue {
          if let name = deserialised["name"] as? String {
            completion(name)
          }
        }
        break
      case .failed(let error):

    request.start { (response, result) in
      switch result {
      case .success(let response):
        if let deserialised = JSON(response.dictionaryValue!) {
          for serialised in (deserialised["data"]?.arrayValue)! {
            if let friend = Friend(json: serialised) {
              handler(friend)
              retrieved += 1
            } else {
              print("unable to deserialise friend \(serialised)")
            }
          }

          if let after = deserialised["paging"]?["cursors"]?["after"]?.stringValue {
            switch limit {
            case .none:
              self.enumerateFriends(type: type, limit: .none, cursor: after,
                                    handler: handler)
              break
            case .count(let count):
              self.enumerateFriends(type: type,
                                    limit: .count(count - retrieved),
                                    cursor: after, handler: handler)
              break
            }
          }
        }
