Jump to content

Nutrients handling in Open Food Facts: Difference between revisions

Line 49: Line 49:
=== Data display ===
=== Data display ===


The OFF web site, and apps, should only use these OFF proocessed fields to display the nutrition data:
The OFF web site, and apps, should only use these OFF processed fields to display the nutrition data:


* nutrient-id_100g or nutrient-id_serving (depending on the value of nutrition_data_per) : value in g or in kJ. The values are passed as float/double???
* <code>{nutrient-id}_100g</code> or <code>{nutrient-id}_serving</code> (depending on the value of nutrition_data_per): value in g or in kJ. The values are passed as float/double???
* nutrient-id_value : to show the original entered/passed data (useful for characters as "<" or "~"}.
* <code>{nutrient-id}_value</code>: to show the original entered/passed data (useful for characters as "<" or "~").


The web site and apps must:
The web site and apps '''must''':
* indicate if the nutrition facts are per 100g or per serving.
* Indicate if the nutrition facts are per 100g or per serving.
* convert the value in g or in kJ to the desired unit.
* Convert the value in g or in kJ to the desired unit.


Notes:
Notes:
72

edits