lngyeen / MySurveyChallenge

0 stars 0 forks source link

[Question] Support for API returning empty JSON {} #34

Open blyscuit opened 3 months ago

blyscuit commented 3 months ago

Issue

lngyeen commented 3 months ago

@blyscuit

To be honest, I didn't pay attention to this problem, but luckily the app still worked, Japx helped me handle this case. In case the API returns empty json {}, if we fetch a list of objects, an empty list will be returned by NetworkJSONAPIClient, and if we fetch a single object then NetworkJSONAPIClient will return the error "Incorrect format"

I also add some tests in this topic: https://github.com/lngyeen/MySurveyChallenge/pull/47