RSSAmplifier

Ole Begemann · Apr 27, 2022

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

0
Sign in to vote or save

This site does not allow itself to be embedded. You can still read it on the original site — the toolbar below keeps your place in the directory.

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" :…

Read on oleb.net

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.