Changes

Jump to navigation Jump to search
318 bytes added ,  13:43, 11 December 2019
Added @stephane's clarifications
Line 91: Line 91:     
The fields can have the following structure:
 
The fields can have the following structure:
 +
* key_value (string)  - the standardized value of a serving of 100g (100ml) for type key (eg in json: "salt_100g":"0.19");
 +
* key_unit (string) - the units used in the other fields (eg in json: "carbohydrates_unit":"g"). Possible values are "kg", "g", "mg, "µg", "l", "ml", "%" or "";
 +
key_value and key_unit are what is entered by the user, or passed to the write api, with the "key" and "key_unit" fields.
 
* key (string) - the value for the nutrition fact key (eg in json: "fiber":"0.5");
 
* key (string) - the value for the nutrition fact key (eg in json: "fiber":"0.5");
 +
Then "key" is a conversion in the default unit of the field (kJ or g)
 
* key_serving (string) -  the value of a serving for type key (eg: in json "carbohydrates_serving":"5.82"). The size of the servig is found in the serving field;
 
* key_serving (string) -  the value of a serving for type key (eg: in json "carbohydrates_serving":"5.82"). The size of the servig is found in the serving field;
* key_value (string)  - the standardized value of a serving of 100g (100ml) for type key (eg in json: "salt_100g":"0.19");
   
* key_100g (string) - the standardized value of a serving of 100g (100ml) for type key (eg in json: "salt_100g":"0.19");
 
* key_100g (string) - the standardized value of a serving of 100g (100ml) for type key (eg in json: "salt_100g":"0.19");
* key_unit (string) - the units used in the other fields (eg in json: "carbohydrates_unit":"g"). Possible values are "kg", "g", "mg, "µg", "l", "ml", "%" or "";
+
And "key_serving" "Key_100g" are values for the serving size or 100g. One of them is equal to "key", the other is converted.
 
* key_label (string) - a more user friendly text explaining the  
 
* key_label (string) - a more user friendly text explaining the  
  
4,520

edits

Navigation menu