W3C home > Mailing lists > Public > public-annotation@w3.org > July 2015

Re: [web-annotation] Yet Another JSON-LD the protocol spec to use?

From: Rob Sanderson via GitHub <sysbot+gh@w3.org>
Date: Fri, 10 Jul 2015 22:24:48 +0000
To: public-annotation@w3.org
Message-ID: <issue_comment.created-120541558-1436567088-sysbot+gh@w3.org>

Touché! :smile_cat: 

>From http://www.w3.org/TR/json-ld/:

>JSON object
An object structure is represented as a pair of curly brackets 
surrounding zero or more key-value pairs. A key is a string. A single 
colon comes after each key, separating the key from the value. A 
single comma separates a value from a following key. In contrast to 
JSON, in JSON-LD the keys in an object must be unique.

So the valid JSON object:
```
{
  "@context": {"label": "rdfs:label"},
  "label" : "fish",
  "@context": {"label": "dc:title"},
  "label": "bat"
}
```

Is not valid JSON-LD.  The playground asserts <> dc:title "bat", for 
what it's worth.


-- 
GitHub Notif of comment by azaroth42
See 
https://github.com/w3c/web-annotation/issues/52#issuecomment-120541558
Received on Friday, 10 July 2015 22:24:50 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:54:37 UTC