Skip to content

Add typing to json-ld #764

Closed
Closed
@Panaetius

Description

@Panaetius

Currently, our json-ld output is untyped for most values, with the values just being string literals. It'd be nice to have type annotations for the values to make the KG less ambiguous, to allow SHACL validation based on types and to support python type annotations once we get rid of python 3.5.

For example, currently we have:

"created": "2018-11-23T14:41:57.822Z"

on projects and dataset metadata. Ideally, it should be:

"created":  {
  "@type": "xsd:dateTime", 
  "@value":"2018-11-23T14:41:57.822Z"
}

using, XMLSchema types (with xsd: http://www.w3.org/2001/XMLSchema#).

The same goes for adding xsd:integer, xsd:boolean, xsd:float and so on.

Related to #700 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions