Re: Any way to specify the default URI for the @id of a @type or the values of a property.

Hi!

> What I would like to do is to specify those prefixes and keep data
telling @id = '123', with the value joins happening at RDF serialisation
stage (the same specification would make it possible to do the opposite
conversion too). Clearly, in such a use case, the prefixes depend on the
@type of objects, and the @base mechanism is not enough. Moreover, it would
be useful to have this mechanism available for properties too, e.g., to
associate the address URI prefix to the values of the "address" JSON
property.

and using namespaces (cf. example 40 in [4.11 IRI Expansion within a
Context] or [4.14 Scoped Contexts]) isn't an option for you?

br, simon

[4.11 IRI Expansion within a Context]
https://json-ld.org/spec/latest/json-ld/#iri-expansion-within-a-context
[4.14 Scoped Contexts]
https://json-ld.org/spec/latest/json-ld/#scoped-contexts


2017-11-18 14:05 GMT+01:00 Marco Brandizi <marco.brandizi@gmail.com>:

> Hi all,
>
> I'm fairly new to JSON-LD, although I have significant experience with
> Semantic Web technologies.
>
> I've read the guideline document (https://www.w3.org/TR/json-ld/) and I
> haven't get if the feature at issue is supported:
>
> suppose you have JSON objects of @type Person and @type Address, both
> having the @id property. Typical API-coming data will have values like
> integers or some internal, context-dependant IDs. It's pretty common to
> RDF-translate those values to prefix-based URIs like "
> http://www.example.com/Person/123" or "http://www.example.com/Addres
> s/xh324m44". What I would like to do is to specify those prefixes and
> keep data telling @id = '123', with the value joins happening at RDF
> serialisation stage (the same specification would make it possible to do
> the opposite conversion too). Clearly, in such a use case, the prefixes
> depend on the @type of objects, and the @base mechanism is not enough.
> Moreover, it would be useful to have this mechanism available for
> properties too, e.g., to associate the address URI prefix to the values of
> the "address" JSON property.
>
> It doesn't seem that this is currently available in JSON-LD, or am I
> missing something? Any plan for future extensions?
>
> Thanks in advance,
> Marco
>
>
>

Received on Tuesday, 21 November 2017 06:53:24 UTC