Jump to content

Nutrients handling in Open Food Facts: Difference between revisions

Added % unit and no unit (for pH, etc).
(Added default unit)
(Added % unit and no unit (for pH, etc).)
Line 27: Line 27:
* for each nutrient:
* for each nutrient:
** nutrient-id (e.g. saturated-fat, energy-kcal) : value for the nutrient, for the size specified in "nutrition_data_per". This is a string ("17.8", "34,7", "< 0.1", etc).
** nutrient-id (e.g. saturated-fat, energy-kcal) : value for the nutrient, for the size specified in "nutrition_data_per". This is a string ("17.8", "34,7", "< 0.1", etc).
** nutrient-id_unit (e.g. saturated-fat_unit, energy-kcal_unit) : the unit of the value passed (e.g. "g", "mg", "kcal", "kJ")
** nutrient-id_unit (e.g. saturated-fat_unit, energy-kcal_unit) : the unit of the value passed (e.g. "g", "mg", "kcal", "kJ", "%", "")


Notes about the energy fields:
Notes about the energy fields:
3,543

edits