Skip to content

Commit 2b76caa

Browse files
committed
Second revision of userguide refresh
1 parent d3b924f commit 2b76caa

File tree

3 files changed

+318
-204
lines changed

3 files changed

+318
-204
lines changed

content/user-guide.md

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -115,34 +115,35 @@ objects. For example:
115115
#### Keywords
116116

117117
JSON-LD has the concept of Keywords, which are properties prefaced with a `@`.
118+
Keywords instruct the processor how to *expand* the document with linked data.
118119

119-
These references work similar to includes in a programming language.
120+
Keywords can pull in other data; like programming language includes, work
121+
like functions; repeating the same data in multiple places, or act like a
122+
setting; changing the rules for the data.
120123
{.tip}
121124

122-
Keywords are instructions for the processor of the file to refer to
123-
previously stored information. This means that the exact same information can
124-
be included multiple times, and pulled from a consistent source.
125+
Some refer to external resources (such as `@context`), some (like `@list` and
126+
`@type`) add new constraints on the values for the property, while others
127+
include a copy of previously recorded information (`@id`).
125128

126-
The source can be an external resource, as depicted in the diagram below:
129+
The diagram below visualises how `@context` instructs the externally stored
130+
definition for CodeMeta to be *embedded* to *expand* the `codemeta.json`
131+
document:
127132

128133
![Diagram of a JSON-LD reference pulling data in from an external data source](/img/jsonld-references-diagram.svg)
129134

130-
The JSON-LD "@type" keyword associates a JSON value or object with a well
135+
The JSON-LD `@type` keyword associates a JSON value or object with a well
131136
known type. In the previous example, the statement `"@type":"Person"`
132-
associates the `author` object with `http://schema.org/Person`. It is good
133-
practice to always provide the `@type` for any property which specifies a node
134-
(JSON object). The [terms page](/terms/) indicates these node types.
137+
associates the `author` object with `http://schema.org/Person`. The
138+
`@type` for any property which specifies a node (JSON object) should be
139+
provided. The [terms page](/terms/) indicates these node types.
135140

136-
Keywords also provide similiar utility to a function in a programming
137-
language; they prompt the processor to output the same data in another place
138-
in the file.
139-
{.tip}
140-
141-
The "author" JSON object illustrates the use of the JSON-LD keyword "@id",
141+
The `author` JSON object illustrates the use of the JSON-LD keyword `@id`,
142142
which is used to associate an IRI with the JSON object. Any such node object
143-
can be assigned an `@id`, and we may use the `@id` to refer to this same
144-
object (the person, Peter), elsewhere in the document; e.g. we can indicate
145-
the same individual is also the `maintainer` by adding:
143+
can be assigned an `@id`, and future uses of the `@id` property's *value* will
144+
refer to this same object, (the person, Peter), elsewhere in the document. For
145+
example, we can indicate the same individual is also the `maintainer` by
146+
adding:
146147

147148
```json
148149
"maintainer": "http://orcid.org/0000-0003-0077-4738"
@@ -168,7 +169,6 @@ individual is the `maintainer` of the software being described, like this:
168169
}
169170
```
170171

171-
172172
JSON-LD operations can later *expand* this reference and *embed* the full
173173
information at both locations.
174174

@@ -290,8 +290,7 @@ represented as the `"url"` of `rmarkdown`, instead of being the url of
290290
### Example of a CodeMeta file
291291

292292
The following is an example of a basic `codemeta.json` that can be put at the
293-
root of a code repository.
294-
([link to full example](https://github.com/gem-pasteur/macsyfinder/blob/master/codemeta.json)):
293+
root of a code repository:
295294

296295
```json
297296
{
@@ -311,6 +310,8 @@ root of a code repository.
311310
}
312311
```
313312

313+
([Link to full example](https://github.com/gem-pasteur/macsyfinder/blob/master/codemeta.json)).
314+
314315
## The context
315316

316317
Every CodeMeta document must refer to the context file *codemeta.jsonld*, for

0 commit comments

Comments
 (0)