Last active
July 6, 2020 21:43
-
-
Save briri/4b42f52ffe2225feea9ce680b5bf739c to your computer and use it in GitHub Desktop.
Example RDA Common Standard JSON from DMPRoadmap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"application": "dmptool-dev", | |
"source": "GET /api/v1/plans/44247", | |
"time": "2020-05-08T15:41:39Z", | |
"caller": "dmproadmap-test", | |
"code": 200, | |
"message": "OK", | |
"page": 1, | |
"per_page": 20, | |
"total_items": 1, | |
"items": [ | |
{ | |
"dmp": { | |
"$schema": "https://github.com/RDA-DMP-Common/RDA-DMP-Common-Standard/tree/master/examples/JSON/JSON-schema/1.0", | |
"title": "Testing our maDMP JSON export", | |
"language": "eng", | |
"created": "2019-08-19T15:45:07Z", | |
"modified": "2020-04-24T22:28:22Z", | |
"ethical_issues_exist": "unknown", | |
"dmp_id": { | |
"type": "url", | |
"identifier": "http://dmproadmap.org/api/v1/plans/44247" | |
}, | |
"contact": { | |
"name": "Brian Riley", | |
"mbox": "br@example.edu", | |
"affiliation": { | |
"name": "University of California, Berkeley", | |
"abbreviation": "UCB", | |
"affiliation_id": { | |
"type": "ror", | |
"identifier": "https://ror.org/01an7q238" | |
} | |
}, | |
"contact_id": { | |
"type": "orcid", | |
"identifier": "https://orcid.org/0000-0001-9870-5882" | |
} | |
}, | |
"contributor": [ | |
{ | |
"name": "Sam Rust", | |
"mbox": "sr@example.edu", | |
"role": [ | |
"https://dictionary.casrai.org/Contributor_Roles/Investigation" | |
], | |
"affiliation": { | |
"name": "University of Edinburgh", | |
"abbreviation": "Edin", | |
"affiliation_id": { | |
"type": "ror", | |
"identifier": "https://ror.org/01nrxwf90" | |
} | |
}, | |
"contributor_id": { | |
"type": "orcid", | |
"identifier": "https://orcid.org/0000-0001-0000-0000" | |
} | |
} | |
], | |
"project": [ | |
{ | |
"title": "Testing our maDMP JSON export", | |
"start": "2019-09-01T15:45:07Z", | |
"end": "20122-08-30T00:00:01Z", | |
"funding": [{ | |
"name": "Abc Foundation", | |
"funder_id": { | |
"type": "fundref", | |
"identifier": "https://api.crossref.org/funders/000000000" | |
}, | |
"grant_id": { | |
"type": "url", | |
"identifier": "https://abc-foundation.org/awards/123" | |
}, | |
"funding_status": "granted" | |
}] | |
} | |
], | |
"dataset": [ | |
{ | |
"title": "Generic Dataset", | |
"personal_data": "unknown", | |
"sensitive_data": "unknown", | |
"dataset_id": { | |
"type": "url", | |
"identifier": "http://dmproadmap.org/api/v1/plans/44247" | |
}, | |
"distribution": [ | |
{ | |
"title": "PDF - Testing our maDMP JSON export", | |
"data_access": "open", | |
"download_url": "http://dmproadmap.org/plans/44247/export.pdf", | |
"format": ["application/pdf"] | |
} | |
] | |
} | |
], | |
"extension": [ | |
{ | |
"dmptool": { | |
"template": { | |
"id": 946, | |
"title": "Environmental Resilience Institute Data Management Plan" | |
} | |
} | |
} | |
] | |
} | |
} | |
] | |
} |
thanks for this @jomtov.
Will update our export. We have added the project start/end dates to our data model but not yet determined how to default them for our historical records (will plug in some defaults in this gist).
Is the structure of the date entry defined somewhere in https://github.com/RDA-DMP-Common/RDA-DMP-Common-Standard/blob/master/examples/JSON/JSON-schema/1.0/maDMP-schema-1.0.json? If so I do not see it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Trying to validate this [i.e line 12-96, so all line-refs. below are +12] with Oxygen 22.1 JSON Validator against the RDA madmp-schema-1.0, produces these errors:
Engine name: JSON Validator
Severity: error
Description: #/dmp/created: [2019-08-19 15:45:07 UTC] is not a valid date-time. Expected [yyyy-MM-dd'T'HH:mm:ssZ, yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,9}Z, yyyy-MM-dd'T'HH:mm:ss[+-]HH:mm, yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,9}[+-]HH:mm]
Start location: 6:9
End location: 6:18
...
Severity: error
Description: #/dmp/modified: [2020-04-24 22:28:22 UTC] is not a valid date-time. Expected [yyyy-MM-dd'T'HH:mm:ssZ, yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,9}Z, yyyy-MM-dd'T'HH:mm:ss[+-]HH:mm, yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,9}[+-]HH:mm]
Start location: 7:9
End location: 7:19
...
Severity: error
Description: #/dmp/project/0: required key [end] not found
Start location: 51:11
End location: 53:12
...
Severity: error
Description: #/dmp/project/0: required key [start] not found
Start location: 51:11
End location: 53:12
...
Severity: error
Description: #/dmp/dataset/0/distribution/0/format: expected type: JSONArray, found: String
Start location: 69:17
End location: 69:25
And then there are the warnings that "id" is not a JSON Schema keyword, proper, but these belong to the actual madmp-schema, rather than to this json-instance, as I have mentioned elsewhere