W3C home > Mailing lists > Public > public-linked-json@w3.org > June 2014

Mapping xsd:boolean xsd:integer xsd:double to native JSON type in @context

From: john.walker <john.walker@semaku.com>
Date: Thu, 19 Jun 2014 10:44:16 +0200 (CEST)
To: public-linked-json@w3.org
Message-ID: <1212890894.360309.1403167456985.open-xchange@oxweb03.eigbox.net>
Hi There,
 
Reading the spec it is not immediately obvious to me if it is possible to get
the native JSON types (number, true and false) in the output when
compacting/flattening/framing against a context.
 
For example my JSON-LD input document is:
 
{
  "@id": "http://example.com/id/Spain",
  "http://example.com/def/isInWorldCup": {
    "@type": "http://www.w3.org/2001/XMLSchema#boolean",
    "@value": "false"
  }
}

As output I'd like to get:
 
{
  "@context": { ... the new context ... }
  "@id": "http://example.com/id/Spain",
  "http://example.com/def/isInWorldCup": false
}

Is there a way to specify in the context that native JSON types should be used?

Cheers,
John
Received on Thursday, 19 June 2014 08:44:44 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:18:41 UTC