You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"name": "Generate CodeMeta Metadata for R Packages",
18
+
"@type": "SoftwareSourceCode",
19
+
"name": "CodemetaR",
19
20
"description": "Codemeta defines a 'JSON-LD' format for describing software metadata. This package provides utilities to generate, parse, and modify codemeta.jsonld files automatically for R packages.",
When creating a CodeMeta document, note that they contain JSON name ("property" in linked-data), value pairs where the values can be simple values, arrays or JSON objects. A simple value is a number, string, or one the literal values *false*, *null**true*, for example:
26
29
27
30
```
28
31
"name" : "R Interface to the DataONE REST API"
29
32
```
30
33
31
-
A JSON array is surrounded by the characters `[` and `]`, and can contain multiple values:
34
+
There must be a comma between of these key-value pairs, and no comma at the end before the closing bracket (`}`).
35
+
36
+
### Arrays
37
+
38
+
A JSON array is surrounded by the characters `[` and `]`, and can contain multiple values separated by commas:
As with any JSON documents, you can add line breaks between values for improved quality. For example, the former key-value pair is this is equivalent to:
45
+
46
+
```
47
+
"keywords": [
48
+
"data sharing",
49
+
"data repository",
50
+
"DataONE"
51
+
]
52
+
```
53
+
54
+
All fields that accept a value of a given type accept an array of values of this type, and vice-versa. For example, a software with two licenses could have this attribute:
55
+
56
+
```
57
+
"license": [
58
+
"https://spdx.org/licenses/GPL-3.0",
59
+
"https://spdx.org/licenses/BSD-3-Clause"
60
+
]
61
+
```
62
+
63
+
### Objects
64
+
37
65
Some properties, such as `author`, can refer to other JSON objects surrounded by curly braces and can contain other JSON values or objects, for example:
(Note: this should be added at the top level of the document, indicating that this individual is the `maintainer` of the software being described.) JSON-LD operations can later *expand* this reference and *embed* the full information at both locations.
88
+
This should be added at the top level of the document, indicating that this individual is the `maintainer` of the software being described, like this:
JSON-LD operations can later *expand* this reference and *embed* the full information at both locations. This means the example above is equivalent to:
It is important to mind the order of curly brackets (an object begins with a `{` and ends with a matching `}`) and indentation (spaces at the beginning of a line) to reflect the hierarchy: "Central R Archive Network (CRAN)" is the name of the provider of "rmarkdown", which is a softwareSuggestion of CodemetaR.
because in the latter, `"https://cran.r-project.org"` is the `"url"` of `rmarkdown`, instead of being the url of `Central R Archive Network (CRAN)`.
63
203
64
204
## The context
65
205
@@ -82,4 +222,4 @@ Release candidate versions may be referred to consistently using their git tag f
82
222
83
223
## Testing An Instance file
84
224
85
-
[ TBD ]
225
+
Our [codemeta-generator](https://codemeta.github.io/codemeta-generator/) can also check a codemeta.json file you wrote is valid. To do that, copy-paste your code in the bottom box, and click "Validate codemeta.json".
0 commit comments