Post

Replies

Boosts

Views

Activity

JSON DATA CORRUPTED ERROR
I don't why, my json file is throwing an error as being corrupted even though json file is valid. (I have checked from json validator). Here is my code: My model: `import Foundation class Person:Identifiable,Decodable{     var id:UUID?     var Name:String     var Address:String     var Company:String     var YearsofExperience:Int } My JSON File [{     "Name":"Inigo Montoya",    "Address":"555 YouKilled My father Street",    "Company":"CodeWithChris",    "YearsofExperience":35  },  {      "Name":"Edna Mode",     "Address":"123 Nocape Lane",     "Company":"CodeWithChris",     "YearsofExperience":177  },  {      "Name":"Travis Bickle",     "Address":"99 Youtalkingtome Road",     "Company":"CodeWithChris",     "YearsofExperience":99  },  {      "Name":"Walter Sobchak",     "Address":"8 Dude Place",     "Company":"CodeWithChris",     "YearsofExperience":23       },  {      "Name":"Jullis Winnfield",     "Address":"25 Ezekiel Ave",     "Company":"CodeWithChris",     "YearsofExperience":17  }] ViewModel: import Foundation class EmployeeModel:ObservableObject{ @Published var person = [Person]() init(){     person.self = DataFetching.getLocalData() } }
18
0
3.3k
Jan ’22