Skip to content
Novus Examples
json1.5 KB

JSON-LD Recipe with steps and nutrition

A valid Recipe with ISO 8601 durations, four ingredients, and instructions that mix flat HowToStep nodes with a nested HowToSection. For testing duration parsing and recursive instruction extraction.

Preview — first 50 linesjson
{
  "@context": "https://schema.org",
  "@type": "Recipe",
  "@id": "https://www.example.com/recipes/sample-soup#recipe",
  "name": "Sample winter soup",
  "description": "Fictional recipe record used as a fixture.",
  "author": {
    "@type": "Person",
    "name": "A. Sample"
  },
  "datePublished": "2026-01-01",
  "prepTime": "PT15M",
  "cookTime": "PT45M",
  "totalTime": "PT1H",
  "recipeYield": "4 servings",
  "recipeCategory": "Soup",
  "recipeCuisine": "Sample",
  "keywords": "sample, fixture, soup",
  "recipeIngredient": [
    "2 sample onions",
    "400 g sample root vegetables",
    "1 L sample stock",
    "1 tsp sample seasoning"
  ],
  "recipeInstructions": [
    {
      "@type": "HowToStep",
      "name": "Prepare",
      "text": "Chop the sample vegetables.",
      "url": "https://www.example.com/recipes/sample-soup#step1"
    },
    {
      "@type": "HowToStep",
      "name": "Simmer",
      "text": "Simmer in the sample stock for 40 minutes."
    },
    {
      "@type": "HowToSection",
      "name": "Finish",
      "itemListElement": [
        {
          "@type": "HowToStep",
          "text": "Blend until smooth."
        },
        {
          "@type": "HowToStep",
          "text": "Season and serve."
        }
      ]
    }
63 lines total — download for the full file.

Specifications

Seed
70400
Site
example.com (fictional)
Format
JSON-LD (schema.org)
Encoding
UTF-8
Types
Recipe, HowToStep, HowToSection, NutritionInformation
Ingredients
4
Instruction Nodes
3
Iso8601 Durations
3

Testing contract

Expected to pass
Scenario
Flatten the recipe instructions into an ordered step list and total the times.
Expected result
Four steps are produced, the two inside the HowToSection preserved in order after the flat ones; PT15M plus PT45M reconciles with the declared PT1H total.

What is a .json file?

JSON (JavaScript Object Notation) is a lightweight, text-based data-interchange format representing objects, arrays, strings, numbers, booleans, and null. It is language-independent, human-readable, and the dominant format for web APIs and configuration. It requires a single well-formed root value.

How to use this file

Use an example JSON file to test parsers and serializers, schema validation, Unicode and number-precision handling, and API request or response processing.

How to use this file for testing

“JSON-LD Recipe with steps and nutrition” is a deterministic Novus Examples fixture for Web assets, JSON parsing, Schema validation, Metadata testing. Favicons, web app manifests, service workers, robots and sitemap files, Open Graph images, and .well-known resources — for testing web tooling, crawlers, PWA installers, and asset pipelines.

Documented properties for this file: seed 70400 · UTF-8 · JSON-LD (schema.org). Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.

Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.

Web-platform fixtures are standards-compliant samples against fictional example.com data. Test crawlers, PWA installers and manifest validators, favicon/icon pipelines, service-worker registration, or .well-known parsers against the documented structure.

Code examples

import json

with open("jsonld-recipe.json") as f:
    data = json.load(f)
print(type(data), len(data))

Generated by generation/web_p7.py. Free for any use, no attribution required — license.