Specify a node type when interpreting JSON as JSON-LD (was: use of "@type" in "@context")
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 139
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Description
Question
It's not clear to me if it's legitimate to use @type in @context instead of in the JSON object, eg.
"@context":
"@vocab": "https://schema.org/",
birthplace:
"@type": "City"
birthplace:
name: Roma
since the jsonld playground renders this as
_:c14n0 <https://schema.org/birthplace> _:c14n1 .
_:c14n1 <https://schema.org/name> "Roma" .
while I expect
_:c14n0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://schema.org/City> .
_:c14n0 <https://schema.org/name> "Roma" .
_:c14n1 <https://schema.org/birthplace> _:c14n0 .
Note
changing the payload to
"birthplace": "Roma"
results in
_:c14n0 <https://schema.org/birthplace> "Roma"^^<https://schema.org/City> .
meaning that in some way the "City" type is processed in some way.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the JSON-LD 1.1 specification and the JSON-LD Playground behavior shown in the issue. Compare the two supplied JSON-LD examples and their resulting RDF, then determine whether the specification needs clarification or a correction. Done means the expected interpretation is resolved and the specification or examples clearly document it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100