Re: Understanding of JSON-LD values

On 06/13/2013 02:05 PM, Sven R.Kunze wrote:
> Wow, thank you. I think that mail clarified a lot for me. I totally 
> agree that most Web developers would rather use what they know instead 
> of learning something new.
> Just one thing: when using JSON-LD just as JSON, you actually do not 
> bring the power of RDF to these developers. You bring the power of 
> JSON to them, which they already now.
> However, that could be the first step for them to familiarize with RDF.

You've got it exactly right. If we can ease them into Linked Data/RDF 
over time by letting them start out without having to change anything 
they are already doing now -- we've taken the right approach, IMO. We 
want them to feel comfortable with slowly adopting this new (to them) 
technology; we don't want to bludgeon them over the head with it. This 
approach also means that the same JSON-based API can support both groups 
of consumers: those that don't (yet) care about Linked Data/RDF and 
those that do.

> Your explanation is very helpful. Thanks again.

Great! Glad I could help.

> Sven
> PS: AFAIK, your python code does not work.

Sorry about that -- I typed it up with too much haste so it has some 
copy & paste typos. The following should work:

# create an object directly from JSON in Python
object = {"foo": "bar"}
print object["foo"] # access and print the foo property's value
object["foo"] = 'a' # set the foo property's value


> *Von:* Dave Longley
> *Gesendet:* ‎Donnerstag‎, ‎13‎. ‎Juni‎ ‎2013 ‎17‎:‎48
> *An:* Sven R. Kunze
> *Cc:* Markus Lanthaler; 'public-rdf-comments'
> On 06/13/2013 11:04 AM, Sven R. Kunze wrote:
> > And to repeat myself. JSON-LD data is just a string.
>
> JSON-LD data should not be thought of as "just" a string. Working with
> JSON is not the same as working with Turtle. This statement and the ones
> below seem to a cause of misunderstanding. I don't know if it arises
> from a general unfamiliarity with JSON or not, but I'll explain below.
>
>
> On 06/12/2013 05:54 AM, Sven R. Kunze wrote:
> >
> > Well, if JSON-LD is a concrete syntax of RDF then people indeed will
> > wish to work with it on the abstract RDF level. They need tools than
> > can parse the JSON-LD and "transform it into a usable programmable
> > API" just using the abstract interface.
> >
> > As I mentioned earlier, the big advantage of RDF is the separation of
> > abstract and concrete syntax. Nobody actually wants to take care of
> > the concrete syntax. There is a graph and I can query it and change at
> > will via an abstract interface like SPARQL or rdflib interface.
>
> While RDF people will certainly be interested in tools that can
> "transform [JSON-LD] into a usable programmable API", your assertion
> that "nobody" wants to take care of the concrete syntax, they just want
> to use tools that provide them with an API to query the graph is
> inaccurate. I take this statement to mean that you think *no one* really
> cares how the serialization (or its structure) looks -- they just want
> to parse it and get it into something they can query with an API. If
> that's what you mean, then you're missing the purpose underlying perhaps
> the most important design goal of JSON-LD: to make sure it can function
> just like idiomatic JSON. That "nobody" you speak of is actually a huge
> swath of web developers; if you're unaware of that, then it explains
> much of the confusion.
>
> I understand that you're arguing that RDF is all about an abstract
> syntax ... so the concrete syntax shouldn't matter. The concrete syntax
> matters to JSON developers -- and we're trying to bring the power of RDF
> to them.
>
> In other words, for web developers, JSON (or JSON-LD) documents are
> essentially themselves *already* "usable, programmable APIs," without
> any API cruft or extra tools. Languages with native JSON parsers make it
> possible to work with JSON documents with the same natural syntax that
> is used to manipulate any other objects or arrays in memory. In more
> concrete terms:
>
> // create an object directly from JSON in JavaScript
> var object = {"foo": "bar"};
> console.log(object.foo); // access and print the foo property's value
> object.foo = 'a'; // set the foo property's value
>
> # create an object directly from JSON in Python
> object = {"foo": "bar"}
> print object.foo // access and print the foo property's value
> object["foo"] = 'a'; // set the foo property's value
>
> Working with JSON is different from working with other serializations
> because the extra layers of parsers and APIs that are required ... *are
> not*. You just don't need them if you want to do something simple. The
> strength of JSON-LD is that you can indicate which parts of a JSON
> document can be interpreted as Linked Data/RDF. That means that you can
> use JSON-LD as JSON *or* you can employ RDF tools to use it as RDF.
>
> This gives us the best of both worlds; it allows people who were
> previously locked out of the Linked Data/RDF world to join it at their
> own pace.
>
> -- 
> Dave Longley
> CTO
> Digital Bazaar, Inc.
>


-- 
Dave Longley
CTO
Digital Bazaar, Inc.

Received on Thursday, 13 June 2013 18:42:48 UTC