A recipe, in an open format.

SREF, the Structured Recipe Exchange Format, saves a recipe as plain JSON: its ingredients, method, original wording, and where it came from. It is an open format of its own, not tied to Savorum.

Keep exported recipes wherever you like. A recipe package can also hold photos and attachments, and any app that supports SREF can open it. Your books, tags, and history stay in your Savorum library.

The recipe and its SREF document

The JSON alongside, read as a recipe.

Lemon yogurt dip

Makes 2 servings · Prep 5 min

Ingredients

  • 150 g plain yogurt
  • 1 teaspoon lemon juice
  • a pinch of salt

To serve

  • Raw vegetables, to serve

Equipment: mixing bowl · spoon · fine grater

Method

  1. Stir the yogurt, lemon juice and salt together.
  2. Taste, adjust the seasoning and serve with raw vegetables.
lemon-yogurt-dip.recipe.jsonComplete SREF 0.4.0
Download JSON
{
  "sref": {
    "version": "0.4.0",
    "unit_registry": "0.2.0"
  },
  "id": "lemon-yogurt-dip",
  "title": "Lemon yogurt dip",
  "ingredient_sections": [
    {
      "id": "ingredients",
      "ingredients": [
        {
          "id": "yogurt",
          "name": "plain yogurt",
          "source_text": "150 g plain yogurt",
          "quantity": {
            "kind": "simple",
            "amount": {
              "value": "150"
            },
            "unit": "mass.gram"
          },
          "normalization": {
            "method": "extracted"
          }
        },
        {
          "id": "lemon",
          "name": "lemon juice",
          "source_text": "1 teaspoon lemon juice"
        },
        {
          "id": "salt",
          "name": "salt",
          "source_text": "a pinch of salt"
        }
      ]
    },
    {
      "id": "to-serve",
      "title": "To serve",
      "ingredients": [
        {
          "id": "vegetables",
          "name": "raw vegetables",
          "source_text": "Raw vegetables, to serve"
        }
      ]
    }
  ],
  "instruction_sections": [
    {
      "id": "method",
      "steps": [
        {
          "id": "mix",
          "text": "Stir the yogurt, lemon juice and salt together.",
          "ingredient_uses": [
            {
              "ingredient_ref": "yogurt"
            },
            {
              "ingredient_ref": "lemon"
            },
            {
              "ingredient_ref": "salt"
            }
          ]
        },
        {
          "id": "serve",
          "text": "Taste, adjust the seasoning and serve with raw vegetables.",
          "ingredient_uses": [
            {
              "ingredient_ref": "vegetables"
            }
          ]
        }
      ]
    }
  ],
  "notes": [
    "For a thicker dip, drain the yogurt in a fine sieve before mixing."
  ],
  "yields": [
    {
      "text": "2 servings",
      "quantity": {
        "kind": "simple",
        "amount": {
          "value": "2"
        },
        "unit": "count.serving"
      },
      "label": "servings"
    }
  ],
  "times": {
    "prep": {
      "value": "PT5M"
    }
  },
  "equipment": [
    {
      "name": "Mixing bowl"
    },
    {
      "name": "Spoon"
    },
    {
      "name": "Fine grater"
    }
  ]
}
The words the recipe used
source_text retains “150 g plain yogurt” and “a pinch of salt”. A reader can keep that wording even when no structured amount is recorded.
A quantity a program can use
The yogurt also has the exact value "150" and unit mass.gram. The pinch has no invented numerical equivalent.
The author’s note
notes travels with the recipe. It is different from a private note saved in an application’s library.

When the recipe includes files

A plain .recipe.json file is enough for the small example above. A .sref package is a ZIP archive that keeps a recipe together with its declared photographs or other assets.

The Baba Ganoush package from Savorum’s actual export includes one source photograph. Open it with a ZIP tool to inspect these three files.

Download Baba Ganoush (.sref) →

Recipe: Wikibooks (CC BY-SA 4.0).

Photograph: Breville USA (CC BY 2.0).

baba-ganoush.sref

recipe.json
The complete structured recipe, including its asset reference.
manifest.json
The package inventory, with sizes and hashes used to check its files.
assets/rc-000175-image
The declared recipe photograph, stored as image/jpeg.

A .srefbundle keeps multiple complete recipe packages in one ordered archive.

Specification and tools

These examples target released SREF 0.4.0. Read the specification first, then use the schema and validator when building or checking a recipe file.

Read the specification →

The complete definition of the format and its rules.

Check the JSON structure →

The canonical schema defines fields and their types.

Validate the recipe →

The reference validator also checks semantic constraints, with conformance examples.

For implementers

Export is not a backup

SREF carries recipe content. Whole-instance recovery also needs the application’s library organization, history, database, and original assets. Use Savorum’s export and backup guide to choose the right copy.

A structured file can be inspected with a text editor. A cooking interface or a transfer to another application still needs compatible software. SREF is not the Savorum API.

Licenses have different scopes

The SREF specification, schema, registry, and canonical examples use CC0 1.0; reference code uses MIT. Savorum itself uses AGPL-3.0-only. The format does not change rights in a recipe or photograph.

See the SREF license map. This page’s original lemon yogurt example is also dedicated under CC0 1.0.