XooCode(){

ReplaceAction

ReplaceAction is an UpdateAction subtype for replacing one thing with another. Properties: replacee (Thing — what's being replaced) and replacer (Thing — what replaces it).

Full example of schema.org/ReplaceAction json-ld markup

The markup is verified as valid with Rich Results Test from Google.

schema.org/ReplaceAction
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "ReplaceAction",
  "agent": { "@type": "Person", "name": "Editor" },
  "replacee": { "@type": "Book", "name": "Xoo Code Handbook v2" },
  "replacer": { "@type": "Book", "name": "Xoo Code Handbook v3" }
}
</script>

Minimal valid version

The smallest markup that still produces a valid ReplaceAction entity. Use it as the floor. Reach for the advanced example above when you want search engines and AI agents to understand more about your content.

schema.org/ReplaceAction (minimal)
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "ReplaceAction",
  "replacee": { "@type": "Thing", "name": "Old" },
  "replacer": { "@type": "Thing", "name": "New" }
}
</script>

Google rich results this unlocks

ReplaceAction is a structural type. It does not produce a rich result on its own.

Its value comes from combining it with a primary type whose markup earns a rich result (Article, Product, Event, and so on). ReplaceAction becomes the trunk that the primary type branches off viamainEntityorbreadcrumb. Include it on every page as the backbone of your markup.

Common ReplaceAction mistakes

Mistakes that pass validation but silently fail to earn rich results or mislead consumers walking the graph. Avoid these and your markup will be ahead of most sites in the wild.

  1. 01

    replacee and replacer swapped

    Wrong
    replacee = new, replacer = old
    Right
    replacee = being replaced (old); replacer = the replacement (new)

    Direction matters — the names are load-bearing.

About the example data

Replacing v2 of the Xoo Code handbook with v3.

Comments

Loading comments...

Leave a comment