Type Safely

Type Safely

Share this post

Type Safely
Type Safely
Set a SwiftUI Published Property To A Codable Structure From JSON Data

Set a SwiftUI Published Property To A Codable Structure From JSON Data

Daily Coding Tip 018

Type Safely's avatar
Type Safely
Jan 05, 2021
∙ Paid

Share this post

Type Safely
Type Safely
Set a SwiftUI Published Property To A Codable Structure From JSON Data
Share
Image by Tri Le from Pixabay

This is based on a post on my Substack, but I’ve expanded it into a working example.

I haven’t worked with Combine much, but I wanted an easy way to get data into my SwiftUI project without using the conventional URLRequest.dataTask.

Instead of creating a Publisher in my ObservableObject, I decided to create an extension of URL…

Keep reading with a 7-day free trial

Subscribe to Type Safely to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Type Safely
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share