Open in app
James Rochabrun
2K Followers
About

Sign in

2K Followers
About
Open in app
Hi: James ,I have this json data, But I don’t know How can I Map JSON to my swift model using…
1

kevin zheng

James Rochabrun

James Rochabrun

Jan 26, 2018·1 min read

looks like you have nested dictionaries in arrays you need to start from them by creating an object for each type of dictionary, for example the topics key has an array of topics now you need to create an object topic with that data and make it conform to the protocol the same for the rest of the keys and so on, is that make sense?

Written by

James Rochabrun

Senior iOS Engineer #latinintech

More from James Rochabrun

Senior iOS Engineer #latinintech

More From Medium

Functional programming in Swift

James Rochabrun in Noteworthy - The Journal Blog

Generic networking layer using Combine in Swift UI.

James Rochabrun in If let swift = Programming!

Object-Oriented Programming is The Biggest Mistake of Computer Science

Ilya Suzdalnitski

Now Is the Perfect Time to Ruin Donald Trump’s Life

Michael Arceneaux in LEVEL

You Are Being Lied to About Inflation. It Hasn’t Been 2% for 30 Years (Here’s Proof).

Tim Denning in The Ascent

Here Is the Real Reason Why Photos Are Banned in the Sistine Chapel

Jason Ward in ILLUMINATION-Curated

The Easiest Way To Get Rich With Stocks

Rocco Pendola in Making of a Millionaire

The Bitcoin Dream Is Dead

James Surowiecki in Marker

About

Help

Legal

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store