oasis-tcs / odata-specs

OASIS OData TC: Markdown sources for OData specification drafts. https://github.com/oasis-tcs/odata-specs
https://oasis-tcs.github.io/odata-specs/
Other
5 stars 2 forks source link

Investigate enhancements to interoperability and feature set of OData JSON through JSON-LD #271

Open ralfhandl opened 4 months ago

ralfhandl commented 4 months ago

Driven by current analysis of JSON-LD in the GeoJSON community, I kindly suggest we investigate how JSON-LD (A JSON-based Serialization for Linked Data) might be mixed into OData JSON to avoid interoperability problems when our annotation and referencing style meets the "@" key culture of JSON-LD.

Specification: URL=http://www.w3.org/TR/json-ld/ and Community URL=http://json-ld.org/

Writing while thinking about it: Maybe a vocabulary might enable aliasing of the keys for JSON-LD overlapped concepts?

Citing the content of JSON-LD 3.3 "Syntax Tokens and Keywords" to go "in medias res":

""" JSON-LD specifies a number of syntax tokens and keywords that are a core part of the language:

@context Used to define the short-hand names that are used throughout a JSON-LD document. These short-hand names are called terms and help developers to express specific identifiers in a compact manner. The @context keyword is described in detail in section 5.1 The Context.

@id Used to uniquely identify things that are being described in the document with IRIs or blank node identifiers. This keyword is described in section 5.3 Node Identifiers.

@value Used to specify the data that is associated with a particular property in the graph. This keyword is described in section 6.9 String Internationalization and section 6.4 Typed Values.

@language Used to specify the language for a particular string value or the default language of a JSON-LD document. This keyword is described in section 6.9 String Internationalization.

@type Used to set the data type of a node or typed value. This keyword is described in section 6.4 Typed Values.

@container Used to set the default container type for a term. This keyword is described in section 6.11 Sets and Lists.

@list Used to express an ordered set of data. This keyword is described in section 6.11 Sets and Lists.

@set Used to express an unordered set of data and to ensure that values are always represented as arrays. This keyword is described in section 6.11 Sets and Lists.

@reverse Used to express reverse properties. This keyword is described in section 6.12 Reverse Properties.

@index Used to specify that a container is used to index information and that processing should continue deeper into a JSON data structure. This keyword is described in section 6.16 Data Indexing.

@base Used to set the base IRI against which relative IRIs are resolved. This keyword is described in section 6.1 Base IRI.

@vocab Used to expand properties and values in @type with a common prefix IRI. This keyword is described in section 6.2 Default Vocabulary.

@graph Used to express a graph. This keyword is described in section 6.13 Named Graphs.

: The separator for JSON keys and values that use compact IRIs.

All keys, keywords, and values in JSON-LD are case-sensitive. """ citation source at URL=http://www.w3.org/TR/json-ld/#syntax-tokens-and-keywords

The decorated IRI terms are described non-normatively e.g.. in section 6.1 for compact IRI:

""" A compact IRI is a way of expressing an IRI using a prefix and suffix separated by a colon (:). The prefix is a term taken from the active context and is a short string identifying a particular IRI in a JSON-LD document. For example, the prefix foaf may be used as a short hand for the Friend-of-a-Friend vocabulary, which is identified using the IRI http://xmlns.com/foaf/0.1/. A developer may append any of the FOAF vocabulary terms to the end of the prefix to specify a short-hand version of the absolute IRI for the vocabulary term. For example, foaf:name would be expanded to the IRI http://xmlns.com/foaf/0.1/name. """

Imported from ODATA-601

sthagen commented 2 months ago

Created on 2014-MAR-09 - a decade ago. The reporter was me, the issue was unassigned, but it is a good idea to assign it to me, I think.