Closed staticdreams closed 4 years ago
You can use onData
and manually perform Json decoding:
Request {
...
}
.onData { data in
let decoder = JSONDecoder()
...
let events = try? decoder.decode([Event].self, from: data)
}
Thanks I will try that. Sorry for stupid questions, I couldn't find an example in the docs :)
No problem! Let me know if you have any other questions.
How would I go about decoding custom data, such as custom formatted dates? Do we have access to
JSONDecoder
so we can do something like this: ?