Reputation: 1307
If you visit the JSON-LD playground page here, and click the "Person" example (which, as of this writing, is this), then the output of the compaction contains an attribute called "type", not "@type" which is what I would expect (since the latter corresponds to the JSON-LD type keyword).
What is it about the compaction algorithm that removes the at symbol from the type? If you click on the "Activity" example, the compacted result does contain "@type". Why is there a difference in processing these two inputs?
Upvotes: 0
Views: 330
Reputation: 3823
This is a feature called Keyword Aliasing. Schema.org recently added a keyword alias form @type
to just type
and @id
to id
to their context and that's why you set that. The compact tab of the person example uses Schema.org's context for the compaction.
Upvotes: 1