[Solved] parsing Json in swift4


The error is very clear:

…burzua_1.Status.(CodingKeys in _479ABD1AF7892C9F2FD23EC23214E088).status], debugDescription: “Expected to decode String but found a number instead.

The value for key status is not in double quotes so it’s an Int

class Status: Codable {
   let status: Int
   ...

Please don’t declare all properties carelessly as optional. For example status as well as all other keys is present in all Status dictionaries.

1

solved parsing Json in swift4