[Solved] how to encode this JSON reply from Food API
[ad_1] You have some response and this response’s value is most likely of type Data, so you need to decode it to some Swift type. Since Swift 4 you can easily use Decodable protocol for decoding Data to your custom model conforming to this protocol. So let’s create simple struct for simple json Json: let … Read more