Relation between the new SwiftData & Parsed JSON data

Hello, I am following the Networking course. In this course a JSON was parsed with data from the Pexels API. How can I relate this with SwiftData?

Can I decorate the struct with ‘@model’ (and change it to a class), so the data persists? Or are these completely separate things?


Welcome to the community!!

So they are completely separate actions (parsing JSON) and using SwiftData

But you can parse JSON and then save it to SwiftData