You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{nutrient-id}: the value converted in the default unit (currently kJ for all energy fields (including energy-kcal), otherwise gram).
Below it adds in "Possible improvements":
Store the energy-kcal values in kcal, without converting them to kJ
However, checking one or two cases from the API suggests that the energy-kcal field is in kcal, not kj, as it is approximately 4.18 times smaller, which would be about the right ratio if they were in kcal/kj, whereas would presumably be a massive discrepancy if they were both in the same units.
So I am guessing the API has changed and the wiki is now out of date?
Would you be able to confirm either way? I'm currently writing a diet diary application which would use this information, and I will be assuming that the kcal field is in fact in kcal unless you say (or I discover) otherwise.
Thanks!
The text was updated successfully, but these errors were encountered:
I hope this is the right way to report this.
This page:
https://wiki.openfoodfacts.org/Nutrients_handling_in_Open_Food_Facts
Says of the nutriment fields:
Below it adds in "Possible improvements":
However, checking one or two cases from the API suggests that the
energy-kcal
field is in kcal, not kj, as it is approximately 4.18 times smaller, which would be about the right ratio if they were in kcal/kj, whereas would presumably be a massive discrepancy if they were both in the same units.Examples:
Also, both fields are missing from:
https://wiki.openfoodfacts.org/API/Full_JSON_example
So I am guessing the API has changed and the wiki is now out of date?
Would you be able to confirm either way? I'm currently writing a diet diary application which would use this information, and I will be assuming that the kcal field is in fact in kcal unless you say (or I discover) otherwise.
Thanks!
The text was updated successfully, but these errors were encountered: