     }
 }
 
-extension DateFormatter {
+public extension DateFormatter {
     static let iso8601Full: DateFormatter = {
         let formatter = DateFormatter()
         formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ"

/// Convert a JSON string into the type `T`
/// @throws errors if deserialization fails
@available(OSX 10.12, *)
func deserialize<T>(_ json: String) throws -> T where T : Codable {
    return try deserialize(Data(json.utf8))
}

/// Support for converting a struct or class to a Dictionary of values
/// Code from https://stackoverflow.com/a/46597941/74137
struct JSON {
    static let encoder = JSONEncoder()
}

extension Encodable {
    subscript(key: String) -> Any? {
        return dictionary[key] as Any?
    }


/// Converts an object to a JSON string
/// @throws errors if deserialization fails
public func serialize<T>(_ value: T) throws -> Data where T : Encodable {
    return try! encoder.encode(value)
}

