W3C home > Mailing lists > Public > public-linked-json@w3.org > January 2012

Re: json-ld.org playground updated

From: Manu Sporny <msporny@digitalbazaar.com>
Date: Wed, 18 Jan 2012 15:16:24 -0500
Message-ID: <4F172898.4050600@digitalbazaar.com>
To: public-linked-json@w3.org
On 01/18/12 15:05, Manu Sporny wrote:
> On 01/18/12 12:10, Alexandre Passant wrote:
>> It seems that @value is not rendered properly, e.g.
> 
> Fixed:
> 
> https://github.com/json-ld/json-ld.org/commit/8b930458dac3e69ddef5bba6b716a6cd76dcaa9e

After some discussion with Dave Longley, both of us feel that we should
kill this feature. It overly complicates the number of ways that you can
express a plain literal.

There is an argument that this should be valid: { "@value": "foo" }

However, it does two things:

1. It complicates what developers have to deal with, now you can't just
check to see if the value is a string for a plain literal... you have to
check if it is a string, and if it isn't, you have to check to see if it
is an object containing an "@value" key and only that key.

2. It complicates the expansion algorithm, instead of { "name": "foo" },
expanded form ends up being {"name": { "@value": "foo"}}

3. The two items above thus complicate implementations.

While it's perfectly logical to interpret { "@value": "foo" } as a plain
literal, I don't think we should because it doesn't buy us anything
other than more complexity. We should keep it simple... plain literals
are expressed as strings in JSON-LD - always.

-- manu

-- 
Manu Sporny (skype: msporny, twitter: manusporny)
President/CEO - Digital Bazaar, Inc.
blog: Web Payments - PaySwarm vs. OpenTransact Shootout
http://manu.sporny.org/2011/web-payments-comparison/
Received on Wednesday, 18 January 2012 20:16:55 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:25:36 GMT