Google email markup tester fails to validate JSON-LD for FlightReservation -
google email markup fails validate json-ld took schema.org flightreservation.
markup tools says type of "boardingpolicy" wrong , "airline" field missing, it's easy test yourself: copy code below , paste there.
does know can fix this?
<script type="application/ld+json"> { "@context": "http://schema.org", "@type": "flightreservation", "reservationid": "rxj34p", "reservationstatus": "reservationconfirmed", "passengerprioritystatus": "fast track", "passengersequencenumber": "abc123", "securityscreening": "tsa precheck", "undername": { "@type": "person", "name": "eva green" }, "reservationfor": { "@type": "flight", "flightnumber": "ua110", "provider": { "@type": "airline", "name": "continental", "iatacode": "co", "boardingpolicy": "zoneboardingpolicy" }, "seller": { "@type": "airline", "name": "united", "iatacode": "ua" }, "departureairport": { "@type": "airport", "name": "san francisco airport", "iatacode": "sfo" }, "departuretime": "2017-03-04t20:15:00-08:00", "arrivalairport": { "@type": "airport", "name": "john f. kennedy international airport", "iatacode": "jfk" }, "arrivaltime": "2017-03-05t06:30:00-05:00" } } </script>
you need replace reservationd reservationnumber.
i don't think boardingpolicy supported. in documentation states "note: of schemas used google still going through standardization process of schema.org, , therefore, may change in future."
instead of seller, should input airline.
i've copied script , modified few attributes , received no errors example (if you're trying trigger google cards, recommend use date/time that's few hours away):
<script type="application/ld+json"> { "@context": "http://schema.org", "@type": "flightreservation", "reservationnumber": "rxj34p", "reservationstatus": "reservationconfirmed", "passengerprioritystatus": "fast track", "passengersequencenumber": "abc123", "securityscreening": "tsa precheck", "undername": { "@type": "person", "name": "eva green" }, "reservationfor": { "@type": "flight", "flightnumber": "ua110", "provider": { "@type": "airline", "name": "continental", "iatacode": "co" }, "airline": { "@type": "airline", "name": "united", "iatacode": "ua" }, "departureairport": { "@type": "airport", "name": "san francisco airport", "iatacode": "sfo" }, "departuretime": "2016-03-04t20:15:00-08:00", "arrivalairport": { "@type": "airport", "name": "john f. kennedy international airport", "iatacode": "jfk" }, "arrivaltime": "2016-03-05t06:30:00-05:00" } } </script>
Comments
Post a Comment