<p>Almost every food product has nutritional values labelling. Is there a digital format, one that would be standardised for use in such a case?</p>
<p>For example I want to create a QR code which is going to contain nutritional facts of a product but I want some other person/applications to be able to read this information without having to adjust their parsing code to get the information required. For this I would need to follow some standardised rules to write down this information, so that everyone can easily parse it, thus I would need some rules that describe: &quot;This should be a .json format, it should have this and that written like this.&quot;.</p>
<p>Reference to what I mean about nutritional facts:
<a href="https://www.fao.org/3/y2770e/y2770e06.htm#TopOfPage" rel="nofollow noreferrer">https://www.fao.org/3/y2770e/y2770e06.htm#TopOfPage</a></p>
<p>I have tried to search for it and I couldn't find anything. Also I could definitely create my own format if none exists but if there is already one - I bet it's best to use it.</p>
<p>Example:</p>
<pre class="lang-javascript prettyprint-override"><code>{
  &quot;nutrients&quot;: {
    &quot;Protein&quot;: 50,
    &quot;Vitamin A&quot;: 800,
    &quot;Vitamin D&quot;: 5,
    &quot;Vitamin C&quot;: 60,
    &quot;Thiamin&quot;: 1.4
  }
}
</code></pre>
<p><a href="https://i.sstatic.net/jpWgDm.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/jpWgDm.png" alt="Nutrients QR Code Example" /></a></p>
<p>If you read plain text of this QR code - you will get the same <code>.json</code> text.</p>
<p>Consider this situation:</p>
<ul>
<li>Similar QR code is printed on milk, fish, meat and other products in a supermarket.</li>
<li>Users can use some kind of application to scan these QR codes.</li>
<li>Each user might use a different application.</li>
</ul>
<p>In this situation each application would read it and need to parse it to make use of it.</p>
<p>If product companies that package milk, fish, meat, etc. each use a different format to store this information - then each application has to adjust for every possible format the companies provide on their products.</p>
<p>If there would be a standardised format that every company used - then each application would only need to write code to parse it once or even use a predefined parser that everyone shares.</p>
<p>I am looking for such a format and if the standard exists at all.</p>
<hr />
<p>The reason I am writing this in Bioinformatics is because it's related to computer science and people related to biology are more likely to have encountered this in their experience.</p>

CC BY-SA 4.0
2022-07-20T12:50:24.013Z
I don't think this is on topic here. More generally the question lacks detail. StackOverFlow might be more suitable.
M__
CC BY-SA 4.0
2022-07-22T08:03:52.140Z
@M__ Thank you, I have elaborated on the issue.
Candid Moon _Max_
<file-formats>
Does standardised format to write nutrients of a product exist?
# Does standardised format to write nutrients of a product exist?

(Asked by: username_0 on 2022-07-20)

Almost every food product has nutritional values labelling. Is there a digital format, one that would be standardised for use in such a case?
For example I want to create a QR code which is going to contain nutritional facts of a product but I want some other person/applications to be able to read this information without having to adjust their parsing code to get the information required. For this I would need to follow some standardised rules to write down this information, so that everyone can easily parse it, thus I would need some rules that describe: "This should be a .json format, it should have this and that written like this.".
Reference to what I mean about nutritional facts:
https://www.fao.org/3/y2770e/y2770e06.htm#TopOfPage
I have tried to search for it and I couldn't find anything. Also I could definitely create my own format if none exists but if there is already one - I bet it's best to use it.
Example:
{
  "nutrients": {
    "Protein": 50,
    "Vitamin A": 800,
    "Vitamin D": 5,
    "Vitamin C": 60,
    "Thiamin": 1.4
  }
}


If you read plain text of this QR code - you will get the same .json text.
Consider this situation:

Similar QR code is printed on milk, fish, meat and other products in a supermarket.
Users can use some kind of application to scan these QR codes.
Each user might use a different application.

In this situation each application would read it and need to parse it to make use of it.
If product companies that package milk, fish, meat, etc. each use a different format to store this information - then each application has to adjust for every possible format the companies provide on their products.
If there would be a standardised format that every company used - then each application would only need to write code to parse it once or even use a predefined parser that everyone shares.
I am looking for such a format and if the standard exists at all.

The reason I am writing this in Bioinformatics is because it's related to computer science and people related to biology are more likely to have encountered this in their experience.

**Tags:** file-formats
> **Comments:**
> **username_1**: I don't think this is on topic here. More generally the question lacks detail. StackOverFlow might be more suitable.  
> **username_0**: @M__ Thank you, I have elaborated on the issue.  

---

## 0 answers

