json-ld.org | JSON for Linked Data | JSON Processing library
kandi X-RAY | json-ld.org Summary
kandi X-RAY | json-ld.org Summary
JSON for Linked Data
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of json-ld.org
json-ld.org Key Features
json-ld.org Examples and Code Snippets
Community Discussions
Trending Discussions on json-ld.org
QUESTION
I have the following JSON document (based on GitHub API output):
...ANSWER
Answered 2022-Jan-29 at 18:58What you want to do is remove the @vocab
definition within license
, alias spdx_id
to @id
, and remove the default vocabulary. This treats the object value of license
as a node object (really node reference) as all keys other than spdx_id
are ignored. See playground link here.
QUESTION
Im pretty new to JSON-LD and am currently struggling making the Google Rich Results Test happy with my custom JSON-LD data.
Every time I use a @context
other than https://schema.org/
it shows me the error Incorrect value type "@context"
.
This even happens with this simple example based on a json-ld.org context:
...ANSWER
Answered 2021-Jul-19 at 14:46According to Dan Brickley (Google employee with responsibility for Schema.org) these issues will be addressed or documented for the new validator:
Thanks - noted and acknowledged. The tool is not opensource (it is a view provided by Google's structured data validation infrastructure). I will make sure these issues are addressed or documented before we link the new validator more prominently from Schema.org.
https://github.com/schemaorg/schemaorg/issues/2921#issuecomment-879817283
QUESTION
Is it possible to reference a property on a blank node? In the following example, what would be the way to express that Secret Agent 2
knows that the email james@007.uk
belongs to Secret Agent 1
? The following is based on this example for blank nodes
ANSWER
Answered 2021-Mar-28 at 00:34You can't really do this in JSON-LD, or really in RDF in general. This document describes two entities each with a set of properties and assets that each knows the other. The relationship is between entities, and not about specific properties of those entities.
You could make the email address, itself, an entity, and then claim some relationship to it. For example, schema.org has a PropertyValueSpecification, which is can have an @id
, and therefore could be referenced, but that is not how I would choose to model it.
JSON-LD-star is a proposed specification for describing the properties of relationships themselves (a variation on RDF-star), so you could create the relationship _:n1 :email "james@007.uk"
as an entity, but this doesn't really get to the indirection you describe. Still, it could look something like the following:
QUESTION
ANSWER
Answered 2021-Feb-18 at 00:17Jay is correct that the knowledge comes from the @context
. This can be specified in a couple of ways:
Inline, using an object value for
@context
(or an array, which includes an object),By directly retrieving a context from the URL specified (e.g., https://json-ld.org/contexts/person.jsonld),
By having the server do context-negotiation on the request, as an HTTP request includes an
Accept
header preferring JSON-LD (see Interpreting JSON as JSON-LD) such as the following:
QUESTION
I have the following json-ld document:
...ANSWER
Answered 2020-May-10 at 01:23From https://www.w3.org/TR/json-ld11/#context-definitions:
"A context definition MUST be a map whose keys MUST be either terms, compact IRIs, IRIs, or one of the keywords @base, @import, @language, @propagate, @protected, @type, @version, or @vocab. "
So @context
really doesn't know nything about nested information as you have it with
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install json-ld.org
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page