Re: Questions about value expansion

> But -- I've got one quick response inline below:

>> Why does a native date, time and dateTime get expanded to include an 
>> @type, but a native integer does not? That seems inconsistent. And 
>> why does the @type get added in this case when the spec doesn't 
>> mention adding @type unless the active context includes a type 
>> mapping?
>>
>
> Since JSON-LD is a subset of JSON, the JSON-LD API spec only covers 
> native support for built-in JSON types. There is such a thing as a 
> JSON number and a JSON boolean -- so native conversion for integers, 
> doubles, and booleans are covered in the spec. However, JSON doesn't 
> natively support dates or times, so that's why @type must be present 
> there. It looks like the Ruby library has a proprietary feature to 
> auto-convert native Ruby dates/times to literals using an assumed 
> appropriate XSD @type.

Perfect! Just wanted some confirmation that what I was seeing there was 
a proprietary, above and beyond the call of duty, feature, and not a 
section of the spec I'd missed or misunderstood. So.. thanks for the 
reply Dave. It's helpful.

Cheers,
Sean

Received on Wednesday, 12 November 2014 23:52:09 UTC