JSON-LD, Sylius and SEO

@matarld
{
  "name": "Pogo stick",
  "description": "A steel jump tool",
  "value": 5000
}
@matarld
{
  "name": "Volume",
  "description": "Sound strength",
  "value": 0
}
@matarld
{
  "name": "Pogo stick",
  "description": "A steel jump tool",
  "value": 5000
}
{
  "name": "Volume",
  "description": "Sound strength",
  "value": 0
}
@matarld
{
  "name": "Pogo stick",
  "type": "Product",
  "description": "A steel jump tool",
  "value": 5000
}
{
  "name": "Volume",
  "type": "Parameter",
  "description": "Sound strength",
  "value": 0
}
@matarld
{
  "name": "Pogo stick",
  "@type": "Product",
  "description": "A steel jump tool",
  "value": 5000
}
{
  "name": "Volume",
  "@type": "Parameter",
  "description": "Sound strength",
  "value": 0
}

Mathias Arlaud

@matarld
mtarld
les-tilleuls.coop
@matarld
{
  "@id": "https://foo.com/pogo-stick",
  "@type": "https://schema.org/Product",
  "@context": {
    "name": "https://schema.org/Name",
    "description": "https://schema.org/Description",
    "value": "https://schema.org/Price"
  },
  "name": "Pogo stick",
  "description": "A steel jump tool",
  "value": 5000
}
{
  "name": "Pogo stick",
  "description": "A steel jump tool",
  "value": 5000
}

JSON-LinkedData

@matarld
{
  "@id": "https://foo.com/pogo-stick",
  "@type": "https://schema.org/Product",
  "...": "..."
  "countryOfAssembly": "https://dbpedia.org/page/France"
}
{
  "@id": "https://dbpedia.org/page/France",
  "@type": "https://dbpedia.org/ontology/Place",
  "utcOffset": "+1",
  "anthem": "https://dbpedia.org/page/La_Marseillaise"
}

JSON-LinkedData

@matarld
Web pages are designed for people. For the Semantic Web, we need to look at existing databases.

- Tim Berners-Lee

Web sémantique

@matarld

Web sémantique

Business

- [x] visibility
- [x] external systems integration

+ revenue (stonks)
- cost (stonks)
@matarld

Web sémantique

Ethic

- [x] reduce silo effect 
- [x] data access

+ innovation
+ egality
@matarld

Resource Definition Framework

@matarld
subjet
object
predicate

Resource Definition Framework

@matarld
object
other predicate
subjet
object
object2

Resource Definition Framework

@matarld
A
B
E
F
G

Resource Definition Framework

C
D
H
I
...
...
@matarld

Resource Definition Framework

https://foo.com/chez-tonton
https://dbpedia.org/page/Toulouse
https://dbpedia.org/ontology/city
https://dbpedia.org/page/France
https://dbpedia.org/ontology/country
https://dbpedia.org/page/Pastis
https://schema.org/Offer
@matarld
foo.com/chez-tonton
dbpedia.org/page/Toulouse
dbpedia.org/ontology/city
foo.com/chez-tonton
dbpedia.org/page/Pastis
schema.org/Offer
dbpedia.org/page/Toulouse
dbpedia.org/page/France
dbpedia.org/ontology/country

Resource Definition Framework

subject
precidate
object
@matarld

Resource Definition Framework

{
  "@id": "https://foo.com/chez-tonton",
  "@type": "s:BarOrPub",
  "@context": {
    "s": "https://schema.org",
    "d": "https://dbpedia.org/ontology",
  },
  "name": "La Cale Sèche",
  "d:city": "https://dbpedia.org/page/Toulouse",
  "s:Offer": "https://dbpedia.org/page/Pastis"
}
@matarld

Resource Definition Framework

- https://www.w3.org/OWL
- https://www.foaf-project.org
- https://schema.org
- https://dbpedia.com
- ...
@matarld

Rich snippets

@matarld

Rich snippets

 <html>
  <head>
    <script type="application/ld+json">
    {
      "@context": "https://schema.org/",
      "@type": "Product",
      "name": "Executive Anvil",
      "image": ["https://example.com/photos/16x9/photo.jpg"],
      "description": "Sleeker than ACME's Classic Anvil.",
      "brand": {"@type": "Brand", "name": "ACME"},
      "aggregateRating": {"@type": "AggregateRating","ratingValue": 4.4}
      "offers": {
        "@type": "Offer",
        "price": 119.99,
        "itemCondition": "https://schema.org/UsedCondition",
        "availability": "https://schema.org/InStock"
      }
    }
    </script>
  </head>
  <body></body>
</html>
@matarld

Rich snippets

{
  "@context": "https://schema.org",
  "@type": "VideoObject",
  "contentURL": "https://example.com/bald-eagle-at-the-park.mp4",
  "description": "Bald eagle at the park livestream.",
  "duration": "PT37M14S",
  "interactionStatistic": {
    "@type": "InteractionCounter",
    "interactionType": { "@type": "WatchAction" },
    "userInteractionCount": 4756
  },
  "name": "Bald eagle nest livestream!",
  "thumbnailUrl": "https://example.com/bald-eagle-at-the-park",
  "publication": [
    {
      "@type": "BroadcastEvent",
      "isLiveBroadcast": true,
      "startDate": "2018-10-27T14:00:00+00:00",
      "endDate": "2018-10-27T14:37:14+00:00"
    }
  ]
}
@matarld

Rich snippets

{
  "@context": "https://schema.org",
  "@type": "QAPage",
  "mainEntity": {
    "@type": "Question",
    "name": "How many ounces are there in a pound?",
    "acceptedAnswer": {
      "@type": "Answer",
      "text": "1 pound (lb) is equal to 16 ounces (oz).",
      "upvoteCount": 1337,
      "url": "https://example.com/question1#acceptedAnswer"
    },
    "suggestedAnswer": [
      {
        "@type": "Answer",
        "text": "There are 15.34 fluid ounces in a pound of water.",
        "upvoteCount": 42,
        "url": "https://example.com/question1#suggestedAnswer1"
      }
    ]
  }
}
@matarld

Rich snippets

{
  "@context": "https://schema.org",
  "@type": "Event",
  "name": "The Adventures of Kira and Morrison",
  "startDate": "2025-07-21T19:00-05:00",
  "endDate": "2025-07-21T23:00-05:00",
  "eventStatus": "https://schema.org/EventScheduled",
  "location": {
    "@type": "Place",
    "name": "Snickerpark Stadium",
    "address": {"@type": "PostalAddress","streetAddress": "100 st"}
  },
  "image": ["https://example.com/photos/16x9/photo.jpg"],
  "description": "The Adventures...",
  "offers": {
    "@type": "Offer",
    "url": "https://www.example.com/event_offer/12345_201803180430",
    "price": "30",
    "availability": "https://schema.org/InStock"
  },
  "performer": {"@type": "PerformingGroup","name": "Kira"}
}
@matarld

Rich snippets

{
  "@context": "http://schema.org",
  "@type": "FlightReservation",
  "reservationStatus": "http://schema.org/Confirmed",
  "underName": {"@type": "Person","name": "Jane Doe"},
  "reservationFor": {
    "@type": "Flight",
    "flightNumber": "201",
    "departureAirport": {
      "@type": "Airport",
      "name": "San Francisco Airport",
    },
    "departureTime": "2027-03-04T11:00:00-05:00",
    "arrivalAirport": {
      "@type": "Airport",
      "name": "John F. Kennedy International Airport",
    },
    "arrivalTime": "2027-03-05T13:25:00-06:00"
  },
  "checkinUrl": "http://united.com/onlinecheckin.html"
}
@matarld
#[ApiResource(
  types: ['https://schema.org/Offer'],
)]
class Offer
{
    public string $description;
    public float $price;
    
    #[ApiProperty(
      types: ['https://dbpedia.org/page/User_review'],
    )]
    public Rating $rating;
}
{
  "@context": "/contexts/Offer",
  "@type": "Offer",
  "description": "The description",
  "price": 1200
}

RDF and API Platform

@matarld

RDF and Sylius

😕

Not much yet...

@matarld

RDF et Sylius

It's your turn!

💪

- [ ] types on API resources
- [ ] product pages
- [ ] listing pages
- [ ] breadcrumb
- [ ] emails
- ...

Merci !

@matarld

[Meetup Sylius Toulouse] JSON-LD, Sylius et SEO

By Mathias Arlaud

[Meetup Sylius Toulouse] JSON-LD, Sylius et SEO

  • 861