Is JSON-LD compaction supposed to remove the at @ from @id and @type?
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?
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.
Asked in February 2016Viewed 2,095 timesVoted 10Answered 1 times