Swift Rest API Call with Codable returning array
问题 This is a further link on this question Swift Rest API call example using Codable When I change the code to handle an array, I'm getting a JSON error. Here's what I'm doing. What am I doing wrong? It errors with "error with json". // Transaction Class import Foundation final class Transaction: Codable { var id: Int? var date: Date var amount: Int var planeID: Int var userID: UUID var month: Int var year: Int init(date: Date, amount: Int, planeID: Int, userID: UUID, month: Int, year: Int) {