Avatar
omochimetaru 6/5/2021 4:48 PM
@swift-main import Foundation enum E: Codable { case a(Int??) } let encoder = JSONEncoder() encoder.outputFormatting = .prettyPrinted let json = try encoder.encode(E.a(.some(.none))) print(String(data: json, encoding: .utf8)!)