Example Question-Answer-239
RDFa (source lint)
<div vocab="http://schema.org/" typeof="Question">
<h1 property="name">What is attr_accessor in Ruby?</h1>
<div property="upvoteCount">196</div>
<div property="text">I am having difficulty understanding Ruby attr_accessors, can someone explain them?</div>
<div>asked <time property="dateCreated" datetime="2010-11-04T20:07Z">Nov 11 '10 at 20:07</time></div>
<div property="author" typeof="Person"><span property="name">someuser</span></div>
<div><span property="answerCount">4</span> answers</div>
<div property="suggestedAnswer acceptedAnswer" typeof="Answer">
<div property="upvoteCount">1337</div>
<div property="text">
(The text of the accepted answer goes here...).
</div>
<div>answered <time property="dateCreated" datetime="2010-12-01T22:01Z">Dec 1 '10 at 22:01</time></div>
<div property="author" typeof="Person"><span property="name">anotheruser</span></div>
</div>
<div property="suggestedAnswer" typeof="Answer">
<div property="upvoteCount">39</div>
<div property="text">
(Another explanation would go here).
</div>
<div>answered <time property="dateCreated" datetime="2010-12-06T21:11Z">Dec 6 '10 at 21:11</time></div>
<div property="author" typeof="Person"><span property="name">lonelyuser1234</span></div>
</div>
</div>
microdata (source lint)
<div itemscope itemtype="http://schema.org/Question">
<h1 itemprop="name">What is attr_accessor in Ruby?</h1>
<div itemprop="upvoteCount">196</div>
<div itemprop="text">I am having difficulty understanding Ruby attr_accessors, can someone explain them?</div>
<div>asked <time itemprop="dateCreated" datetime="2010-11-04T20:07Z">Nov 11 '10 at 20:07</time></div>
<div itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">someuser</span></div>
<div><span itemprop="answerCount">4</span> answers</div>
<div itemprop="suggestedAnswer acceptedAnswer" itemscope itemtype="http://schema.org/Answer">
<div itemprop="upvoteCount">1337</div>
<div itemprop="text">
(The text of the accepted answer goes here...).
</div>
<div>answered <time itemprop="dateCreated" datetime="2010-12-01T22:01Z">Dec 1 '10 at 22:01</time></div>
<div itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">anotheruser</span></div>
</div>
<div itemprop="suggestedAnswer" itemscope itemtype="http://schema.org/Answer">
<div itemprop="upvoteCount">39</div>
<div itemprop="text">
(Another explanation would go here).
</div>
<div>answered <time itemprop="dateCreated" datetime="2010-12-06T21:11Z">Dec 6 '10 at 21:11</time></div>
<div itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">lonelyuser1234</span></div>
</div>
</div>
JSON-LD (source lint)
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Question",
"name": "What is attr_accessor in Ruby?",
"upvoteCount": "196",
"text": "I am having difficulty understanding Ruby attr_accessors, can someone explain them?",
"dateCreated": "2010-11-04T20:07Z",
"author": {
"@type": "Person",
"name": "someuser"
},
"answerCount": "4",
"acceptedAnswer": {
"@type": "Answer",
"upvoteCount": "1337",
"text": "(The text of the accepted answer goes here...).",
"dateCreated": "2010-12-01T22:01Z",
"author": {
"@type": "Person",
"name": "someuser"
}
},
"suggestedAnswer": {
"@type": "Answer",
"upvoteCount": "39",
"text": "(The text of the accepted answer goes here...).",
"dateCreated": "2010-12-06T21:11Z",
"author": {
"@type": "Person",
"name": "lonelyuser1234"
}
}
}
</script>
RDFa (source lint)
<div vocab="http://schema.org/" typeof="Question">
<h1 property="name">What is attr_accessor in Ruby?</h1>
<div property="upvoteCount">196</div>
<div property="text">I am having difficulty understanding Ruby attr_accessors, can someone explain them?</div>
<div>asked <time property="dateCreated" datetime="2010-11-04T20:07Z">Nov 11 '10 at 20:07</time></div>
<div property="author" typeof="Person"><span property="name">someuser</span></div>
<div><span property="answerCount">4</span> answers</div>
<div property="suggestedAnswer acceptedAnswer" typeof="Answer">
<div property="upvoteCount">1337</div>
<div property="text">
(The text of the accepted answer goes here...).
</div>
<div>answered <time property="dateCreated" datetime="2010-12-01T22:01Z">Dec 1 '10 at 22:01</time></div>
<div property="author" typeof="Person"><span property="name">anotheruser</span></div>
</div>
<div property="suggestedAnswer" typeof="Answer">
<div property="upvoteCount">39</div>
<div property="text">
(Another explanation would go here).
</div>
<div>answered <time property="dateCreated" datetime="2010-12-06T21:11Z">Dec 6 '10 at 21:11</time></div>
<div property="author" typeof="Person"><span property="name">lonelyuser1234</span></div>
</div>
</div>
microdata (source lint)
<div itemscope itemtype="http://schema.org/Question">
<h1 itemprop="name">What is attr_accessor in Ruby?</h1>
<div itemprop="upvoteCount">196</div>
<div itemprop="text">I am having difficulty understanding Ruby attr_accessors, can someone explain them?</div>
<div>asked <time itemprop="dateCreated" datetime="2010-11-04T20:07Z">Nov 11 '10 at 20:07</time></div>
<div itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">someuser</span></div>
<div><span itemprop="answerCount">4</span> answers</div>
<div itemprop="suggestedAnswer acceptedAnswer" itemscope itemtype="http://schema.org/Answer">
<div itemprop="upvoteCount">1337</div>
<div itemprop="text">
(The text of the accepted answer goes here...).
</div>
<div>answered <time itemprop="dateCreated" datetime="2010-12-01T22:01Z">Dec 1 '10 at 22:01</time></div>
<div itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">anotheruser</span></div>
</div>
<div itemprop="suggestedAnswer" itemscope itemtype="http://schema.org/Answer">
<div itemprop="upvoteCount">39</div>
<div itemprop="text">
(Another explanation would go here).
</div>
<div>answered <time itemprop="dateCreated" datetime="2010-12-06T21:11Z">Dec 6 '10 at 21:11</time></div>
<div itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">lonelyuser1234</span></div>
</div>
</div>
JSON-LD (source lint)
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Question",
"name": "What is attr_accessor in Ruby?",
"upvoteCount": "196",
"text": "I am having difficulty understanding Ruby attr_accessors, can someone explain them?",
"dateCreated": "2010-11-04T20:07Z",
"author": {
"@type": "Person",
"name": "someuser"
},
"answerCount": "4",
"acceptedAnswer": {
"@type": "Answer",
"upvoteCount": "1337",
"text": "(The text of the accepted answer goes here...).",
"dateCreated": "2010-12-01T22:01Z",
"author": {
"@type": "Person",
"name": "someuser"
}
},
"suggestedAnswer": {
"@type": "Answer",
"upvoteCount": "39",
"text": "(The text of the accepted answer goes here...).",
"dateCreated": "2010-12-06T21:11Z",
"author": {
"@type": "Person",
"name": "lonelyuser1234"
}
}
}
</script>
Example ReplyAction-Question-Answer-151
JSON-LD (source lint)
<!-- John replied '4' to Steve's question 'What's 2 + 2?'. -->
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "AskAction",
"agent": {
"@type": "Person",
"name": "John"
},
"recipient": {
"@type": "Person",
"name": "Steve"
},
"resultComment": {
"@type": "Answer",
"parentItem": {
"@type": "Question",
"text": "What's 2 + 2?"
},
"text": "4."
}
}
</script>
JSON-LD (source lint)
<!-- John replied '4' to Steve's question 'What's 2 + 2?'. -->
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "AskAction",
"agent": {
"@type": "Person",
"name": "John"
},
"recipient": {
"@type": "Person",
"name": "Steve"
},
"resultComment": {
"@type": "Answer",
"parentItem": {
"@type": "Question",
"text": "What's 2 + 2?"
},
"text": "4."
}
}
</script>