BethanyG / NANA

4 stars 0 forks source link

Clean Up and Simplify JSON Creation On Back-End #21

Open BethanyG opened 7 years ago

BethanyG commented 7 years ago

The JSON document produced on the backend is unwieldy, and is getting hard to both parse and troubleshoot. Propose one or a combination of the following:

1) Break it up into several JSON documents (parsed recipe vs analyzed recipe) 2) Flatten the structure to be more readable (Don't nest the analysis under ingredients?? not sure here what to do to flatten...) 3) Break it entirely apart into ingredient components (perhaps in prep for using ReactJS on front end) 4) Remove any extra or unneeded nutrients (based on user preference and set defaults). Right now, all nutrients are being queried and returned for every ingredient...but we are only using a fraction of those. Suggest we only query for the sub-set, so that fewer are expanding the JSON.