Post

Replies

Boosts

Views

Activity

Reply to Save/Print encoded data to Json (pretty printed)
Does this help… let encoder = JSONEncoder()     encoder.outputFormatting = .prettyPrinted     do {         let data = try encoder.encode(user) //convert user to json data here         print(String(data: data, encoding: .utf8)!) //print to console     } catch {         print("fail")     }
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Mar ’22