Use-cases wanted! Adding dietary requirements to

by @edent | # # | 6 comments | Read ~159 times.

I want to add dietary requirements to the Person specification. And I need your help!

Background is a metadata standard. You can include it on webpages to create structured, machine-readable data.

Here’s a sample way of representing a Person:

  "@context": "",
  "@type": "Person",
  "name": "Albert Einstein",
  "hasOccupation": [
      "@type": "Occupation",
      "name": "Professor of Physics",
      "occupationLocation": {
        "@type": "Country",
        "name": "USA",
        "sameAs": ""

Hopefully easy to follow. This is a Person, they have a name and an occupation. That occupation has a name and is located in a country. That country has some linked data.

There are all sorts of properties we can associate with a Person – birth and death dates, memberships, nationality, credentials, tax ID, and even weight! See for a full list.

One which I think would be useful is a person’s diet.


Schema already has the concept of a RestrictedDiet type. It lists things like Vegetarian, Halal, Kosher, Low Salt etc.

But it only applies to MenuItem and Recipe types. That is, I can mark up a restaurant’s menu and say that this dish is Gluten Free, and that dish is Vegan friendly.

    "@context": "",
    "name":"Potato Skins",
    "description":"Small serving of baked potato skins.",
            "@type": "GlutenFreeDiet"
            "@type": "VeganDiet"

My Use Cases

I maintain a personal contact site. I tell people my name, address, occupation, etc. I also want to inform other people that I am vegetarian.

  • On a social network, it might be nice to have an (optional) feature where people give their dietary preferences.
  • My Jewish and Muslim friends might want to automatically filter out the pork casserole recipes people post.
  • My address book might suggest a restaurant which caters for my guests’ preferences.
  • An encyclopædia can show dietary restrictions of famous people.
  • An airline could – with permission – read your social profile to select your meal for a flight.


Here’s how I think it could work:

    "@context": "",
    "@type": "Person",
    "name": "Terence Eden",
    "restrictedDiet": ""

That is, just add restrictedDiet as a valid property of Person. I suppose it could be hasDiet or dietaryPreference or similar.

Your Use Cases

If you want to add your own use cases, or just think this is a good idea, please leave a comment on

6 thoughts on “Use-cases wanted! Adding dietary requirements to

  1. Neil says:

    Should it be an array of restrictedDiets, so I can be a gluten-free vegetarian?

  2. Difficult Guest says:

    What about allergies? They can be life or death. Are they “diet-modifiers”? How would you express “I eat everything except wheat, eggs, and white fish”? E.g. my partner gets a rash from eating raw tomatoes (heat-treated ones are fine). That’s weirdly specific, I know, but it does highlight how difficult these things can be.

    Someone who’s diabetic can eat sugary and carb-rich things. It’s not an allergy and they like it as much as anyone else. However, they’ll have a strong dietary preference for meals where sugar and carbs aren’t the main ingredients. Labeling them a “SugarFree” would be old-fashioned. The term “LowCarb” is a somewhat-related-but-different health fad. “I prefer a smaller amount of carb-rich sides like potatoes and rice. Give me one instead of three potatoes, and add some filler-greens instead. I’d like one scoop of ice-cream for desert instead of three as listed on the menu.

  3. Guest says:

    Maybe your diet is restricted for a limited time. For example, if you’re training for a sporting event, or taking special dietary measures for a limited time for health reasons?

    1. Robin says:

      That should be fine. Many person attributes change over time, including “name” – although the frequency of that would hopefully be lower to avoid confusion.

Leave a Reply

Your email address will not be published. Required fields are marked *