We are decoding properly now! I used Swift Playgrounds to make a quick test environment which was really helpful. The most annoying thing was the path to learning about JSONDecoder
's dateDecodingStrategy
exists, which let me automatically decode date strings into native Date
objects.
The nice thing about this is that when I ping a route, for example /users/jedmund
it will automatically give me an object without me having to think about mapping it from JSON.