Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
空の文字列または int のいずれかになる可能性がある JSON からのコード化可能な構造体のフィールドをどのように処理しますか? データ型 any を使用してみましたが、それは codable に準拠していません。値がない場合は空の文字列を返すか、そうでない場合はintを返すと思います。Swift 4 と XCode 9 を使用しています。よろしくお願いします