You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the APIClient class tries to parse a dictionary using JSONSerialization, this brings a couple of problems:
single elements or Arrays from a JSON response are not be supported.
The dictionary is then used to convert it into a Data object to then use a JSONDecoder. This is an unnecessary back and forth which adds complexity and more prone to errors.
Ideally, the client would pass a type that would like to get back and the APIClient will handle the rest. An alternativeis to ahve like a middle layer that takes care of the parsing/decoding.
germanStabile, CamilaMoscatelli, agerace, mato2593, glm4 and 4 more