-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validate ro-crate-metadata.json is flattened #27
Comments
I've found an example of unflattened RO-Crate that is still recognized as valid: {
"@context": "https://w3id.org/ro/crate/1.1/context",
"@graph": [
{
"@id": "ro-crate-metadata.json",
"@type": "CreativeWork",
"about": {"@id": "./"},
"conformsTo": {"@id": "https://w3id.org/ro/crate/1.1"}
},
{
"@id": "./",
"@type": "Dataset",
"name": "not_flattened",
"description": "not_flattened",
"license": "Apache-2.0",
"datePublished": "2024-11-12",
"hasPart": [{"@id": "somedir/"}]
},
{
"@id": "somedir/",
"@type": "Dataset",
"name": "dataset",
"description": "dataset",
"variableMeasured": [
{
"@type": "PropertyValue",
"propertyID": "https://example.org/terms/ru#realTime",
"name": "realTime",
"value": "42"
}
]
}
]
} I ran
|
@simleo good catch! So the reason for this is, that I (faulty) assumed that nested blocks always have an rocrate-validator/rocrate_validator/profiles/ro-crate/must/0_file_descriptor_format.py Line 112 in bcbe829
Basically, it says "if there is a nested dict, and the dict has an One option would be to assume that a dictionary that is not on if "@id" not in entity or len(entity) > 1:
return False |
Hi,
The RO-Crate documentation mentions that the JSON-LD in a valid ro-crate-metadata.json file is flattened:
https://www.researchobject.org/ro-crate/specification/1.1/structure.html
From my tests, the validator does not validate against it. I.e. here is an unflattend JSON-LD that is recognized as a valid RO-Crate:
The text was updated successfully, but these errors were encountered: