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

/// @throws errors if deserialization failsœ
/// some interesting date decoding options here: https://stackoverflow.com/questions/44682626/swifts-jsondecoder-with-multiple-date-formats-in-a-json-string
/// https://benscheirman.com/2017/06/swift-json/ excplores lots of options, none that help with strings misrepresented as int
func deserialize<T>(_ data: Data) throws -> T where T : Codable {
    let decoder = JSONDecoder()
    decoder.dateDecodingStrategy = .formatted(DateFormatter.iso8601Full)
//    decoder.dateDecodingStrategyFormatters = [

    }
}

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