longngo1313 / Nimbl3-Technical-Test

0 stars 0 forks source link

Approaching JSONAPI data modeling is incorrect #1

Open sleepylee opened 5 years ago

sleepylee commented 5 years ago

Hi Long, first of all, thanks for your interest and re-submission again, I personally appreciate your effort there on completing the test.

Regarding the issue opening here, I'd say your technical choice on resolving the response is not sufficient. It's simply unscalable and not generic enough to handle different keys scenario. A better approach in my opinion, is to have the data generically unmarshalled/parsed as a part of the converting before using, typically you may want to have a look at this adapter https://github.com/kamikat/moshi-jsonapi

If you're interesting, you may take a read at this post as well to see what else can we leverage with this format type: https://www.birbit.com/jsonapi-is-a-blessing-for-offline-ready-apps/

longngo1313 commented 5 years ago

Hi Trung Le, Sorry for reposing you too late. I am on a vacation. I understood this issue. I will investigate that Thanks for your help.