ylliX - Online Advertising Network

AttributedString’s Codable format and what it has to do with Unicode

Here’s a simple AttributedString with some formatting: import Foundation let str = try! AttributedString( markdown: “Café **Sol**”, options: .init(interpretedSyntax: .inlineOnly) ) AttributedString is Codable. If your task was to design the encoding format for an attributed string, what would you come up with? Something like this seems reasonable (in JSON with comments): { “text”: “Café […]