         XCTAssertNotEqual(JSON.boolean(true), JSON.string("true"))
         XCTAssertNotEqual(JSON.string("true"), JSON.int(1))
         XCTAssertNotEqual(JSON.int(1), JSON.double(1.0))
-        XCTAssertNotEqual(JSON.string("true"), JSON.date(date))
+        XCTAssertNotEqual(JSON.string("true"), JSON.date(date!))
         XCTAssertNotEqual(JSON.double(1.0), JSON.array([JSON.double(1.0)]))
         XCTAssertNotEqual(JSON.array([JSON.double(1.0)]),
                           JSON.object(["x": JSON.double(1.0)]))


    func testDecodeDate() {
        let dateFormatter = DateFormatter()
        dateFormatter.dateFormat = "yyyy-MM-dd"
        let stringDate = "2018-05-30"
        let date = dateFormatter.date(from: stringDate)

        let json = "{ \"key\": 2018-05-30 }"
        let data = json.data(using: .utf8)!
        let object = try! JSONDecoder().decode([String: JSON].self, from: data)
        XCTAssertEqual(object["key"], .date(date))
    }

    func testDecodeString() {

    func testEquality() {
        // date values
        let dateFormatter = DateFormatter()
        dateFormatter.calendar = Calendar(identifier: .iso8601)
        dateFormatter.locale = Locale(identifier: "en_US_POSIX")
        dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXXX"
        let stringDate = "2018-05-17T18:45:32.189Z"
        let stringDate2 = "2017-04-16T15:45:32.189Z"
        let date = dateFormatter.date(from: stringDate)
        let date2 = dateFormatter.date(from: stringDate2)

