The RecipeJSON Format Abstract RecipeJSON is a recipe data interchange format based on JavaScript Object Notation (JSON). It defines a type of JSON objects and the manner in which they are combined to represent data about recipes features, their properties, and their spatial extents. Status of This Memo This is currently in the experimental stage and very much subject to change. This first draft was created from the 20.07.2017 to the 22.07.2017 at the "Code Kombüse" Hackathon and is my first formal definition, so don't hit me for it. Example A German RecipeJSON: { "version": 1, "title": "Schinken - Käse - Toast à la brenny", "subtitle": "schnell und einfach mit dem Toaster und der Mikrowelle (mit Grillfunktion)", "servings": { "type": "item", "count": 1 }, "tags": [ "Fingerfood", "Mikrowelle", "Studentenküche", "einfach", "Snack", "Schnell", "Resteverwertung" ], "recipes": [ { "ingredients": [ { "name": "Toastbrot", "unit": "Scheibe/n", "amount": 2, "attributes": [ "Sandwichtoast" ] }, { "name": "Schmelzkäse", "unit": "Scheibe/n", "amount": 2 }, { "name": "Schinken", "unit": "Scheibe/n", "amount": 2, "attributes": [ "gekochter" ] } ], "directions": [ { "duration": "P1M", "text": "Toastbrot rösten", "ingredients": ["Toastbrot"], "result": "Toastbrot geröstet", }, { "duration": "P1M", "text": "Toastbrot mit Schmelzkäse und Schinken belegen", "ingredients": ["Toastbrot geröstet", "Schmelzkäse", "Schinken"], "result": "Toast mit Schinken und Käse", }, { "duration": "P1M", "text": "Toastbrot mit Käse Schmelzkäse und Schinken im Mikrowellenherd grillen", "ingredients": ["Toast mit Käse und Schinken und Käse"], "result": "", }, ] } ], "language": "de", "source": "http://www.chefkoch.de/rezepte/1085491214404371/Schinken-Kaese-Toast-a-la-brenny.html", "author": "brenny", "creationDate": "2008-06-26T22:43:17+02:00" } =============================================================================================== 1.0.0 Recipe envelope definition The base level of a RecipeJSON has to contain the following fields: `version`, `title`, `language`, `creationDate`, `servings`, `recipes` it may also contain the following fields: `subtitle`, `source`, `author`, `images`, `links`, `tags` 1.0.1 Version A Recipe envelope has to contain a field `version` as number. This draft just defines version 1, more may be defined in the future, and may not be compatible to this version. 1.0.2 Title A Recipe envelope has to contain a field `title` as string. This is should just be the title of the whole recipe. 1.0.3 Language A Recipe envelope has to contain a field `language` as string. This is should be the language of the recipe, and contain any ISO 639-1 Code. 1.0.3 Creation Date A Recipe envelope has to contain a field `creationDate` as string. This is should be the creation date and time as ISO 8601 date formatted as YYYY-MM-DDThh:mm:ssTZD. 1.0.4 Servings A Recipe envelope has to contain a field `servings` as object. This itself has to contain two fields: `type`, `count` `type` may be one of two values: `person` marking it as serving number of persons or `item` marking it as producing number of items `count` has to be a number and identifies the number of persons or servings of the recipe 1.0.5 Recipes A Recipe envelope has to contain a field `recipes` containing a list of Recipe objects. The Recipe object is defined in 1.2.0. 1.0.6 Subtitle A Recipe envelope may contain a field `subtitle` as string. The subtitle should describe the recipe in more detail than the title. 1.0.7 Source A Recipe envelope may contain a field `source` as string. The source has to contain a URL to the source. 1.0.8 Author A Recipe envelope may contain a field `author` as string. The author may contain an email address or username. 1.0.9 Images A Recipe envelope may contain a field `images` as a list of strings. The images have to be URLs and should display the full recipe with all subrecipes. 1.0.10 Links A Recipe envelope may contain a field `links` as a list of strings. The images have to be URLs and should be links to websites containing relevant infomation for this recipe. 1.0.11 Tags A Recipe envelope may contain a field `tags` as a list of strings. The tags should describe the recipe and may be used for search. =============================================================================================== 1.2.0 Recipe object definition The Recipe objects of a RecipeJSON have to contain the following fields: `ingredients`, `directions` it may also contain the following fields: `title`, `subtitle`, `images`, `links`, `tags` The title is not mandatory, but recipes containing multiple subrecipes should contain a title. 1.2.1 Ingredients A Recipe object has to contain a field `ingredients` containing a list of Ingredient objects. The Ingredient object is defined in 1.3.0. 1.2.2 Directions A Recipe object has to contain a field `directions` containing a list of Direction objects. The Direction object is defined in 1.4.0. 1.2.3 Title A Recipe object may to contain a field `title` as string. This is should just be the title of the subrecipe. 1.2.4 Subtitle A Recipe object may contain a field `subtitle` as string. The subtitle should describe the recipe in more detail than the title. 1.2.5 Images A Recipe object may contain a field `images` as a list of strings. The images have to be URLs and should display just the subrecipe. 1.2.6 Links A Recipe object may contain a field `links` as a list of strings. The images have to be URLs and should be links to websites containing relevant infomation for this subrecipe. 1.2.7 Tags A Recipe object may contain a field `tags` as a list of strings. The tags should describe the recipe and may be used for search. =============================================================================================== 1.3.0 Ingredient object definition The Ingredient objects of a RecipeJSON have to contain the following fields: `unit`, `name` it may also contain the following fields: `amount`, `attributes` 1.3.1 Unit The Ingredient object has to contain a field `unit` as string. The unit should contain a string describing the unit. Further definition needed for better automation. 1.3.1 Name The Ingredient object has to contain a field `result` as string. The name is used to identify the ingredient in the directions. 1.3.2 Amount The Ingredient object may contain a field `amount` as string. The amount is a number used in conjunction with unit to describe how much of the ingredient should be used. 1.3.2 Attributes The Ingredient object may contain a field `attributes` as a list of strings. The Attributes should be used to describe the ingredient further. =============================================================================================== 1.4.0 Direction object definition The Direction objects of a RecipeJSON have to contain the following fields: `text` it may also contain the following fields: `duration`, `images`, `ingredients`, `result` 1.4.1 Text A Direction object may contain a field `text` as string. The text should discribe the actions that have to be taken in this direction. 1.4.2 Duration A Direction object may contain a field `duration` as string. The duration should be a ISO 8601 duration string. 1.4.3 Images A Direction object may contain a field `images` as a list of strings. The images have to be URLs and should display just the direction. 1.4.4 Ingredients A Direction object may contain a field `ingredients` as a list of strings. The strings should reference either on of the ingredients or a result from a previous direction step. 1.4.5 Result A Direction object may contain a field `result` as string. The result may be used in the ingredients for a direction, or can be omitted. =============================================================================================== Authors' Addresses Leon Kunert info@leonkunert.de Felix Böösch