{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "One cup-weight figure a published source states for one ingredient",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id",
    "ingredient",
    "ingredient_name",
    "source",
    "source_short",
    "publisher",
    "source_kind",
    "url",
    "accessed",
    "as_named",
    "unit",
    "per_amount",
    "grams_printed",
    "grams_per_unit",
    "method",
    "cup_ml_stated"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "source:ingredient[:method][:suffix]. Stable while the source and the row stand.",
      "x-origin": "built",
      "x-source": "artwaste-land"
    },
    "ingredient": {
      "type": "string",
      "description": "The ingredient id in research/cup-weights/ingredients.mjs, which is the judgement that this printed row is that ingredient.",
      "x-origin": "built",
      "x-source": "artwaste-land"
    },
    "ingredient_name": {
      "type": "string",
      "description": "The ingredient as the page names it.",
      "x-origin": "built",
      "x-source": "artwaste-land"
    },
    "source": {
      "type": "string",
      "description": "Our id for the source; sources.json has the document.",
      "x-origin": "built",
      "x-source": "artwaste-land"
    },
    "source_short": {
      "type": "string",
      "description": "The name the page prints for the source.",
      "x-origin": "built",
      "x-source": "artwaste-land"
    },
    "publisher": {
      "type": "string",
      "description": "Who publishes the page.",
      "x-origin": "built",
      "x-source": "artwaste-land"
    },
    "country": {
      "type": [
        "string",
        "null"
      ],
      "description": "The country the source writes for, as recorded at harvest; null where not recorded.",
      "x-origin": "built",
      "x-source": "artwaste-land"
    },
    "source_kind": {
      "type": "string",
      "description": "government, test-kitchen, mill, publisher, blog, measurement, forum, document or standard.",
      "x-origin": "built",
      "x-source": "artwaste-land",
      "enum": [
        "government",
        "test-kitchen",
        "mill",
        "publisher",
        "blog",
        "measurement",
        "forum",
        "document",
        "standard"
      ]
    },
    "url": {
      "type": "string",
      "description": "The exact page the figure was read on.",
      "x-origin": "built",
      "x-source": "artwaste-land"
    },
    "accessed": {
      "type": "string",
      "description": "The date the page was read, YYYY-MM-DD.",
      "x-origin": "built",
      "x-source": "artwaste-land",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "as_named": {
      "type": "string",
      "description": "The row label as we transcribed it from the chart, so the row can be found on the page. The chart's own verbatim wording is shown on the page, as a quotation, and is not redistributed here.",
      "x-origin": "built",
      "x-source": "artwaste-land"
    },
    "unit": {
      "type": "string",
      "description": "The volume unit the figure is per: cup, tbsp or tsp.",
      "x-origin": "built",
      "x-source": "artwaste-land",
      "enum": [
        "cup",
        "tbsp",
        "tsp"
      ]
    },
    "per_amount": {
      "type": "number",
      "description": "How many of that unit the printed figure was for (1 for \"1 cup\", 0.5 for \"1/2 cup\").",
      "x-origin": "built",
      "x-source": "artwaste-land",
      "exclusiveMinimum": 0
    },
    "grams_printed": {
      "type": "number",
      "description": "The gram figure as printed, for per_amount of the unit.",
      "x-origin": "built",
      "x-source": "artwaste-land",
      "exclusiveMinimum": 0
    },
    "grams_per_unit": {
      "type": "number",
      "description": "grams_printed divided by per_amount: the figure per one cup (or spoon). The only arithmetic in the file.",
      "x-origin": "built",
      "x-source": "artwaste-land",
      "exclusiveMinimum": 0
    },
    "ounces_printed": {
      "type": [
        "number",
        "null"
      ],
      "description": "An ounce figure the source printed beside the grams, where it did; null otherwise.",
      "x-origin": "built",
      "x-source": "artwaste-land"
    },
    "method": {
      "type": [
        "string",
        "null"
      ],
      "description": "The filling method the source states FOR THIS ROW, or null where it states none. Never inferred.",
      "x-origin": "built",
      "x-source": "artwaste-land",
      "enum": [
        "spooned",
        "scooped",
        "dipped",
        "sifted",
        "unsifted",
        "packed",
        "loose",
        "measured",
        null
      ]
    },
    "method_chart_wide": {
      "type": [
        "string",
        "null"
      ],
      "description": "A method the source states for its whole chart, applied to a row that states none of its own; null otherwise.",
      "x-origin": "built",
      "x-source": "artwaste-land",
      "enum": [
        "spooned",
        "scooped",
        "dipped",
        "sifted",
        "unsifted",
        "packed",
        "loose",
        "measured",
        null
      ]
    },
    "cup_ml_stated": {
      "type": [
        "number",
        "null"
      ],
      "description": "The cup volume, in millilitres, the source itself states for its figures. Null where it states none. Never inferred from the country.",
      "x-origin": "built",
      "x-source": "artwaste-land"
    },
    "note": {
      "type": [
        "string",
        "null"
      ],
      "description": "What a careful reader should know about this row.",
      "x-origin": "built",
      "x-source": "artwaste-land"
    }
  }
}
