dcolli23 / ingreedyents

Optimizes the use of ingredients by ingredient UPC lookup
0 stars 0 forks source link

Need way of converting from string in JSON request result to uniTypes type #45

Open dcolli23 opened 4 years ago

dcolli23 commented 4 years ago

Description

In the pipeline of going from the received JSON document to parsing the document into the Ingredient object (and subsequent Nutrient objects), we need a way of converting from the string describing the unit of the nutrient serving in the JSON file to a uniTypes type.

Proposal

I'm thinking the best way to do this is to create a map (perhaps in uniTypes) that gives us the appropriate type for a given string. I don't think there's a better way to do this but I'm not sure.

NOTE: This issue must be solved for completion of #44