1

I'm trying to transform some data to JSON-LD format, I've read the specification and some other sources but I'm still confused about the types I should be using.

The RDF Concepts spec has http://www.w3.org/2001/XMLSchema as recommended. Also the JSON-LD playground at http://json-ld.org/playground/ is using these types a lot for the examples. I had the feeling that these types are outdated.

Is there a specific reason to continue using these types? Isn't it better to use the types from schema.org ? I'm also confused about types like skos:notation. Should I continue to use them or I should try to find an alternative from schema.org ?

luciddream
  • 11
  • 2
  • There's a difference between datatypes of literals (e.g., `"foobar"^^xsd:string") which are part of the literal and "types" for resources, (e.g., `dbpedia:Daniel_Webster rdf:type dbpedia-owl:Person`) which are just a corresponding value of the rdf:type property. You mentioned "the types from schema.org"; does schema.org actually define new *datatypes*, or just *classes* (i.e., what you'd use with rdf:type)? – Joshua Taylor Apr 27 '15 at 17:05
  • If i'm not mistaken the literal datatypes can be considered new data types, e.g http://schema.org/Integer. But also is there a reason to use http://purl.org/dc/terms/abstract when there is schema.org/description. I think it's not very clear. The only source I can see using only data from schema.org is: https://developers.google.com/structured-data/testing-tool/ – luciddream Apr 27 '15 at 17:11
  • Interesting; It's not clear to me whether they're claiming to define new datatypes, or if that hierarchy is just there to indicate that the values of the properties listed on those pages should have the corresponding XSD types. Using the XSD types makes a lot more sense, in my opinion, because that's what most RDF processing tools expect, and they are sort of "hard coded" into the language. E.g., in RDF 1.1, a plain string literal automatically has the type xsd:string, and in the N3 serialization and in SPARQL queries, raw numbers are shorthand for literals with XSD types. – Joshua Taylor Apr 27 '15 at 17:17
  • E.g., the SPARQL query `select (3 as ?three) (datatype(?three) as ?dt) {}` gives back `3` for `?three` and `http://www.w3.org/2001/XMLSchema#integer` for `?dt`. – Joshua Taylor Apr 27 '15 at 17:19
  • 1
    As to whether to use dcterms:abstract versus a similar property from schema.org; I think it depends on who you expect to consume the information, and what they're accustomed to handling. – Joshua Taylor Apr 27 '15 at 17:20
  • It seems my search talents have been rusty, this is already answered :( http://stackoverflow.com/questions/26906367/microdata-rdfa-or-json-ld-appropriate-or-best-usage/26913183#26913183 – luciddream Apr 27 '15 at 17:45

0 Answers0