import Foundation
struct PostsModel: Codable {
let posts: [Post]
}
struct Post: Codable {
let postID, timeshamp, likesCount: Int
let title, previewText: String
var timestampValue: String
enum CodingKeys: String, CodingKey {
case timeshamp, title
case postID = "postId"
case previewText = "preview_text"
case likesCount = "likes_count"
}
Type 'Post' does not conform to protocol 'Decodable' How to fix it???How to fix it???How to fix it???How to fix it???How to fix it???How to fix it???How to fix it???How to fix it???How to fix it???How to fix it???How to fix it???How to fix it???How to fix it???How to fix it???How to fix it???