             "array":  Json.fromArray(array),
             "dict":   Json.fromDictionary(dict),
             "sub":    sub.toJson(),
-            "null":   Json.Null
-            ]
+            "null":   Json.Null,
+            "date":   date.toJson()
+        ]
         return Json.Object(json)
     }
 

    }

    func testJsonDecode() {
        let jsonString = "{\"int\":321.0,\"bool\":false," +
        "\"array\":[\"bar\"],\"dict\":{\"bar\":\"baz\"}," +
        "\"float\":321.0,\"string\":\"bar\",\"sub\":{\"foo\":\"bar\"}}"

        let decoder = JsonDecoder(jsonString: jsonString)
        let decoded = TestStruct(json: decoder.json)

        XCTAssert(decoded.int == 321, "Invalid int value")
        XCTAssert(decoded.bool == false, "Invalid bool value")

        array  = decoder.readArray("array")!
        dict   = decoder.readDictionary("dict")!
        sub    = decoder.readValue("sub")!
        date   = decoder.readValue("date")!
    }

    func toJson() -> Json {
