-
Notifications
You must be signed in to change notification settings - Fork 12
Description
I'm working to convert a full schema.org json-ld record for software into a codemeta and am having problems with the codemeta validator. The json validates on https://validator.schema.org/. Pasting the first few lines
{
"@context": {
"@vocab": "https://schema.org/",
"prov": "http://www.w3.org/ns/prov#",
"sosa": "https://w3c.github.io/sdw-sosa-ssn/ssn/#SOSA"
},
"@id": "https://doi.org/10.5281/zenodo.591887",
"@type": ["SoftwareSourceCode", "SoftwareApplication"]
}
into the codemeta validator gives the error
Wrong document type: must be "SoftwareSourceCode"/"SoftwareApplication", not ["SoftwareSourceCode","SoftwareApplication"]
This error makes no sense to me because SoftwareApplication is not lower on the tree than SoftwareSourceCode. But when I change the line to be as instructed anyway,
{
"@context": {
"@vocab": "https://schema.org/",
"prov": "http://www.w3.org/ns/prov#",
"sosa": "https://w3c.github.io/sdw-sosa-ssn/ssn/#SOSA"
},
"@id": "https://doi.org/10.5281/zenodo.591887",
"@type": "SoftwareSourceCode"/"SoftwareApplication"
}
I still get the error
Could not read codemeta document because it is not valid JSON (SyntaxError: Expected ',' or '}' after property value in JSON at position 256 (line 8 column 34)). Check for missing or extra quote, colon, or bracket characters.
Any ideas? Can the codemeta validator be updated to accept multiple types so that the fields from both can be used?
If codemeta is aligned more with schema.org, we could lean more on the schema.org validator instead of making a completely new one. Then, all we would need to do is check the schema.org validator for errors, and if it passes, then just check that the terms codemeta has selected are used (e.g. author instead of creator).