Skip to content

Conversation

gkellogg
Copy link
Member

@gkellogg gkellogg commented Aug 15, 2018

This is a stab at updating the syntax document to create feature-related sections. I also attempt to clarify some terms.


Preview | Diff

Copy link
Member

@BigBlueHat BigBlueHat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a wee whitespace fix. Otherwise, I do like the new organization and think it focuses reading better that before.

index.html Outdated
"****@type****": ****[ "http://schema.org/Restaurant", "http://schema.org/Brewery" ]****####,
"@id": "http://me.markus-lanthaler.com/",
"@type": ****[****"
http://schema.org/Person",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whitespace broke the data(base) star. 😉

Travis was mostly right...it's Example 14 though, not 13 per Travis:
https://pr-preview.s3.amazonaws.com/w3c/json-ld-syntax/pull/47.html#x3-4-specifying-the-type

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Matching example numbering in an external script is challenging, and I'll need to look into that more later.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, numbering seems to be off because of the example in typographical conventions, which isn't considered by the script, as it's in an included file. It may just be an off-by-one problem, but changing that to use Example 0 might make sense anyway.

@gkellogg gkellogg dismissed BigBlueHat’s stale review August 15, 2018 20:46

Fixed broken example

index.html Outdated
@@ -237,7 +237,7 @@ <h2>How to Read this Document</h2>
<li>Software developers who want to implement processors and APIs for
JSON-LD</li>
<li>Software developers who want to generate or consume Linked Data,
an RDF graph, or an <a>RDF Dataset</a> in a JSON syntax</li>
an RDF <a>graph</a>, or an <a>Dataset</a> in a JSON syntax</li>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"a Dataset"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The official terminology is indeed "RDF Dataset" alongside with "RDF graph". The term "Dataset" may be considered as too ambiguous. I would prefer keep this as is.

index.html Outdated
<!--<li><a href="https://json-ld.org/minutes/">Public teleconferences</a> are held
on Tuesdays at 1500UTC on the second and fourth week of each month.</li> -->
<li>Technical discussion typically occurs on the working group mailing list:
<a href="https://lists.w3.org/Archives/Public/public-json-ld-wg/">public-json-ld-wg@w3.org</a></li>

<li>The <a href="https://webchat.freenode.net/?channels=json-ld">#json-ld</a>
IRC channel is available for real-time discussion on irc.freenode.net.</li>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should update this to the w3c wg channel or perhaps list both?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say list both.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iherman is there a URL to reference the #json-ld channel on irc.w3.org directly?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

http://irc.w3.org/?channels=json-ld for the Web-based IRC client or irc://irc.w3.org/#json-ld for those with irc:// protocol handlers installed properly.

index.html Outdated
or an <a>IRI</a>.</p>
<p class="changed">Within a directed graph, nodes with may
be <em>unnamed</em>, i.e., not identified by an <a>IRI</a> or representing
a data such as <a>strings</a> or <a>numbers</a>. Such nodes are called <a>blank nodes</a>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"a data" -> "data"

index.html Outdated
@@ -454,7 +453,7 @@ <h2>Syntax Tokens and Keywords</h2>
<dt class="changed"><code>@nest</code></dt><dd class="changed">Collects a set of <a>nested properties</a> within
a <a>node object</a>.</dd>
<dt class="changed"><code>@none</code></dt><dd class="changed">Used as an index value
in an id map, language map, type map or elsewhere where a dictionary is
in an <a>id map</a>, <a>language map</a>, <a>type map</a> or elsewhere where a dictionary is
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doc is mostly using oxford comma. Add one here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... and the W3C style guides also ask for Oxford commas...:-)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a friend with an Oxford comma tatoo for situations just like this one. 😁 We should add one.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you tattoo an oxford comma?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ink and a needle. Same as normal tatoos. 😉

index.html Outdated
in section <a href="#advanced-concepts" class="sectionRef"></a>.
</p>
Context. The Context can also be used to help interpret other more
complext JSON datastructures as Linked Data and to specify a context
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: complext -> complex
typo: datastructures -> data structures

index.html Outdated
</p>
Context. The Context can also be used to help interpret other more
complext JSON datastructures as Linked Data and to specify a context
as part of an <a>expanded term definition</a>, to apply for values associated with that term.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence is a bit difficult to read. May need some rewording.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe should link "term" here too.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about the following:

This section only covers the most basic features of the JSON-LD Context.
The Context can also be used to help interpret other more
complex JSON data structures, such as indexed values,
ordered values, and
nested properties.
More advanced features related to the JSON-LD Context are covered in
section ....

index.html Outdated
example, in the <em>schema.org</em> vocabulary, the <em>givenName</em>
property is associated with a <em>Person</em>. Therefore, one may reason that
if a <a>node object</a> contains the property <em>firstName</em>, that the
type is a <em>Person</em>; making this explicity with an explicit type helps
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

making -> marking?

index.html Outdated
property is associated with a <em>Person</em>. Therefore, one may reason that
if a <a>node object</a> contains the property <em>firstName</em>, that the
type is a <em>Person</em>; making this explicity with an explicit type helps
to clarify.</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trailing [english something something]... maybe use "to clarify the association."

index.html Outdated
the core functionality described above. The following section describes this
the core functionality described above. JSON can be used to express data
using a variety of different stuctures, and the features described in this
section can be used to interpret a variety of different JSON structures into
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"to interpret a variety of different JSON structures" -> "to interpret those structures"

index.html Outdated
using a variety of different stuctures, and the features described in this
section can be used to interpret a variety of different JSON structures into
Linked Data. A JSON-LD processor will make use of provided and embedded
contexts to interpret property values in a number of different ideomatic
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ideomatic -> idiomatic

index.html Outdated
definition. See <a href="#sets-and-lists" class="sectionRef"></a> for a
further discussion.</p></dd>
<dt>Property nesting</dt>
<dd><p>Another JSON idium often found in APIs is to use an
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idiom

index.html Outdated
for those triples also having a common predicate. The result may
then be framed by using the
<a data-cite="JSON-LD11-FRAMING#framing-algorithm">Framing Algorithm</a>
described in [JSON-LD11-FRAMING] to create the desired object embedding.</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need double brackets.

index.html Outdated
<code>http://greggkellogg.net/foaf</code> which could include a similar
representation.</p>

<p>A common idium found in JSON usage is objects being specified as the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idiom

index.html Outdated
<p>See <a href="#embedding" class="sectionRef"></a> details these relationships.</p>
</dd>
<dt>Indexed values</dt>
<dd><p>Another common idium in JSON is to use an intermediate object to represent property values via indexing. JSON-LD allows data to be indexed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idiom

index.html Outdated
href="#nested-properties" class="sectionRef"></a>.</p></dd>
<dt>Referencing objects</dt>
<dd>
<p>Linked data is all about describing the relationships between different objects.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cap "data"

index.html Outdated
<p>Linked data is all about describing the relationships between different objects.
Sometimes these relationships are between objects defined in different
documents described on the web, sometimes the resources are described
within the same document.</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably switch whole para to use "resources" vs "objects".

index.html Outdated
<p>Section <a href="#the-context"></a> introduced the basics of what makes
JSON-LD work. This section expands on the basic principles of the
<a>context</a> and demonstrates how more advanced use cases can
be achieved using JSON-LD. </p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra space before end tag.

index.html Outdated
<a>context</a> and demonstrates how more advanced use cases can
be achieved using JSON-LD. </p>

<p>In general, contexts may be used at any time a
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove "at".

index.html Outdated
</pre>

<p>Setting <code>@base</code> to <a>null</a> will prevent
<a>relative IRIs</a> to be expanded to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"to be" -> "from being"

index.html Outdated
contexts, within the body of the document. Contexts linked via a
<code>http://www.w3.org/ns/json-ld#context</code> <a data-cite="RFC5988#section-5">HTTP Link Header</a> MUST be
ignored for such documents.</p>
<p>The example shown above would generate the following data.</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"." -> ":"

index.html Outdated
which look like <a>IRIs</a> using an underscore (<code>_</code>)
as scheme. This allows one to reference the node locally within the document, but
makes it impossible to reference the node from an external document. The
<a>blank node identifier</a> is scoped to the document in which it is used.</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra space after scoped.

@iherman
Copy link
Member

iherman commented Aug 16, 2018

@gkellogg I do like what you have done, but I would go a little bit further:

  • I think section 4 should stop with 4.8.
    • 4.9-4.11 should be in their separate, top level section (ie, section 5). Up until that point, section 4 describes features of JSON-LD that I, as an author of data, would/could use when creating JSON-LD. If I am 'just' an author, I would not really care about expanding, compacting, or flattening; these are interesting for JSON-LD processors, but for an author. Hence they should be in a separate top level section.
    • Same with 4.12 and 4.13. These are ways to set up how to consume JSON-LD not the way I would author data. I would argue it should be separated from the rest.
  • We did discuss whether the named graph section should be in its own top level section. With that organization that may not be necessary...

@iherman
Copy link
Member

iherman commented Aug 16, 2018

Is Example 66 correct? This is an example of a 'bush', but this means that the example context is not valid for the second graph. Ie, the value of "name" will not be valid. In other words Example 66 is not equivalent to Example 67...

<standard nag>We should really make it easier to encode bushes:-)</standard nag>

@BigBlueHat
Copy link
Member

Is Example 66 correct? This is an example of a 'bush', but this means that the example context is not valid for the second graph. Ie, the value of "name" will not be valid. In other words Example 66 is not equivalent to Example 67...

True. At this point Example 66 doesn't output the second Person at all (see playground demo).

We should really make it easier to encode bushes:-)</standard nag>

If there's a shared @context, then isn't {"@context": "...", "@graph": [{}, {}, {}]} about as obvious as we can make it? I think the simple array-style for "bushes" works best when you have a bunch of JSON-LD document which may or may not have shared contexts, and you simply want to concatenate them. But this is decidedly off topic. 😄 But apparently still wants discussing. 😃

@gkellogg
Copy link
Member Author

@davidlehn thanks for your detailed review and comments; some of these problems have been in the document for a while.

@davidlehn
Copy link
Contributor

@gkellogg Yeah, I figured as long as I was reading the diffs I might as well suggest changes on the moved text too. I really didn't even think too much about the reorganization itself!

@dlongley
Copy link
Contributor

Unfortunately, I don't have enough time to review this thoroughly right now, but I did skim it. Overall, I think it's an improvement to the structural reorganization of the advanced concepts and other latter sections. I'm a little concerned that we may have significantly upped the reading level with more complex language, but perhaps that can be addressed as needed in the future. It's good that the accessibility of the introduction and basic sections have been left as is.

@azaroth42
Copy link
Contributor

The new structure looks good to me. For FPWD it's already far better than most, so I think we should lock this one in. Further changes over time are obviously inevitable, and we can work on wording later in the WG.

@gkellogg gkellogg merged commit 8530193 into master Aug 17, 2018
@gkellogg gkellogg deleted the reorganization branch August 17, 2018 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants