//
//  GMFGBLEHandlerProtocol.swift
//  MVM5G
//
//  Created by Jason Beck on 7/10/20.
//  Copyright © 2020 Kyle. All rights reserved.
//
import Foundation

protocol GMFGBLEHandlerProtocol {
    func convertToData(_ dictionary: [String: Any]) -> Data?
    func response(response: [String : Any])
    func deviceNotReady()
}

extension GMFGBLEHandlerProtocol {
    func convertToData(_ dictionary: [String: Any]) -> Data? {
        do { return try JSONSerialization.data(withJSONObject: dictionary, options: []) }
        catch { return nil }
    }
}
