Multiple rdf:types

668 views
Skip to first unread message

Fabian Christ

unread,
Oct 27, 2010, 5:38:53 AM10/27/10
to JSON-LD Mailinglist
Hi,

I'm currently working on a serialization from an Apache Clerezza Graph
to JSON-LD format.

Now as I learned, in RDF an entity can have any number of rdf:type
properties, and their values need not be in a subclass relationship (or
any other relationship besides all being subtypes of Thing).

In JSON-LD I only have the "a" token to express "the rdf:type of the
active subject". How can and should I express multiple rdf:types?

Best regards,
- Fabian

Mark Birbeck

unread,
Oct 27, 2010, 6:16:02 AM10/27/10
to jso...@googlegroups.com
Hi Fabian,


On Wed, Oct 27, 2010 at 10:38 AM, Fabian Christ
<christ...@googlemail.com> wrote:
> Hi,
>
> I'm currently working on a serialization from an Apache Clerezza Graph
> to JSON-LD format.

Great.


> Now as I learned, in RDF an entity can have any number of rdf:type
> properties, and their values need not be in a subclass relationship (or
> any other relationship besides all being subtypes of Thing).

Indeed.


> In JSON-LD I only have the "a" token to express "the rdf:type of the
> active subject". How can and should I express multiple rdf:types?

Anywhere that you can place a single item you can place an array. For example:

{
"name": "Fabian",
"a": [
"<http://xmlns.com/foaf/0.1/Person>",
"<http://example.org/ResearchAssociate>"
]
}

See:

<http://json-ld.org/spec/latest/#multiple-objects-for-a-single-property>

Regards,

Mark

Fabian Christ

unread,
Oct 27, 2010, 7:10:05 AM10/27/10
to jso...@googlegroups.com
Hi Mark,

Am Mittwoch, den 27.10.2010, 11:16 +0100 schrieb Mark Birbeck:
> Anywhere that you can place a single item you can place an array. For
> example:
>
> {
> "name": "Fabian",
> "a": [
> "<http://xmlns.com/foaf/0.1/Person>",
> "<http://example.org/ResearchAssociate>"
> ]
> }

ah yes, thank you!

-Fabian

Reply all
Reply to author
Forward
0 new messages