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
Description
In the pipeline of going from the received JSON document to parsing the document into the
Ingredient
object (and subsequentNutrient
objects), we need a way of converting from the string describing the unit of the nutrient serving in the JSON file to auniTypes
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