If you want to use C7.JSON type with Jay in your project, just use this package, which automatically includes the appripriate Jay version.
do {
//get data from disk/network
let data: [UInt8] = ...
//ask Jay to parse your data
let json = try Jay().c7jsonFromData(data) // C7.JSON
//if it doesn't throw an error, all went well
if let tasks = json.dictionary?["today"]?.array {
//you have a dictionary root object, with an array under the key "today"
print(tasks) //["laundry", "cook dinner for gf"]
}
} catch {
print("Parsing error: \(error)")
}
do {
let json: JSON = ... // C7.JSON
let data = try Jay(formatting: .prettified).dataFromC7Json(json: json) // [UInt8]
//send data over network, save to disk
} catch {
print("Formatting error: \(error)")
}
.Package(url: "https://github.com/czechboy0/Jay-C7.git", majorVersion: 0, minor: 16)
Please create an issue with a description of your problem or open a pull request with a fix.
MIT
Honza Dvorsky - http://honzadvorsky.com, @czechboy0