datasetjson - Read and write CDISC Dataset JSON formatted datasets in R and Python
R/Pharma 2025 Workshop
2025-11-07
{
"datasetJSONCreationDateTime": "2024-07-30T09:38:42",
"datasetJSONVersion": "1.1.0",
"fileOID": "www.cdisc.org/StudyMSGv2/1/2024-07-30/dd",
"dbLastModifiedDateTime": "2020-08-21T09:14:25",
"originator": "CDISC SDTM MSG Team",
"sourceSystem": {"name": "Sponsor System", "version": "1.0"},
"studyOID": "cdisc.com.CDISCPILOT01",
"metaDataVersionOID": "MDV.MSGv2.0.SDTMIG.3.3",
"metaDataRef": "define.xml",
"itemGroupOID": "IG.DD",
"records": 3,
"name": "DD",
"label": "Death Details",
"columns": [ ],
"rows": [ ]
}| Attribute | Description |
|---|---|
| datasetJSONCreationDateTime | The date/time the Dataset-JSON file was created. |
| datasetJSONVersion | The version of the Dataset-JSON standard used to create the dataset. |
| fileOID | A unique identifier for this dataset. |
| dbLastModifiedDateTime | The date/time the source database was last modified. |
| originator | The organization that generated the dataset. |
| Attribute | Description |
|---|---|
| sourceSystem | The information system from which the dataset content was sourced. |
| sourceSystem.name | The name of the sourceSystem above. |
| sourceSystem.version | The version of the sourceSystem above. |
| studyOID | Unique identifier for the study that may function as a foreign key to a Study/@OID in a Define-XML file. |
| Attribute | Description |
|---|---|
| metaDataVersionOID | Unique identifier for the metadata version that may also function as a foreign key to a MetaDataVersion/@OID in an associated Define-XML. |
| metaDataRef | URI for a metadata file describing the dataset, such as a Define-XML file. |
| itemGroupOID | Unique identifier for the dataset that may function as a foreign key to an ItemGroupDef/@OID in a Define-XML file. |
| records | The total number of records in a dataset. |
| Attribute | Description |
|---|---|
| name | The human readable name for the dataset. |
| label | A short description of the dataset. |
| columns | An array of metadata objects that describe the dataset variables. |
| rows | An array of data record arrays that represent the dataset rows. |
| Attribute | Description |
|---|---|
| itemOID | Unique identifier for the variable that may function as a foreign key to an ItemDef/@OID in a Define-XML file. |
| name | Variable name |
| label | Variable description |
| dataType | Logical data type of the variable. |
| Attribute | Description |
|---|---|
| targetDataType | The variable with a specified dataType must be converted into the targetDataType when transforming the Dataset-JSON dataset into an operational format. |
| length | Specifies the number of characters allowed for the variable value when it is represented as a text. The variable lengths are planned lengths. |
| displayFormat | A SAS display format value used for data visualization of numeric float and date values. |
| keySequence | Indicates that this item is a key variable and the order of the keys in the dataset structure. |
"columns": [
{"itemOID": "IT.AE.STUDYID", "name": "STUDYID", "label": "Study Identifier",
"dataType": "string", "length": 12},
{"itemOID": "IT.ADAE.TRTSDT", "name": "TRTSDT",
"label": "Date of First Exposure to Treatment", "dataType": "date",
"targetDataType": "integer", "displayFormat": "E8601DA."},
{"itemOID": "IT.ADAE.TRTEDT", "name": "TRTEDT",
"label": "Date of Last Exposure to Treatment", "dataType": "date",
"targetDataType": "integer", "displayFormat": "E8601DA."},
{"itemOID": "IT.ADAE.ASTDT", "name": "ASTDT",
"label": "Analysis Start Date", "dataType": "date",
"targetDataType": "integer", "displayFormat": "E8601DA.", "keySequence": 3}
]
"rows": [
["CDISCPILOT01", "..." , "2014-01-02", "2014-07-02", "2014-01-03", "..."]
]{
"datasetJSONCreationDateTime": "2024-07-30T09:38:42",
"datasetJSONVersion": "1.1.0",
"fileOID": "www.cdisc.org/StudyMSGv2/1/2024-07-30/dd",
"dbLastModifiedDateTime": "2020-08-21T09:14:25",
"originator": "CDISC SDTM MSG Team",
"sourceSystem": {"name": "Sponsor System", "version": "1.0"},
"studyOID": "cdisc.com/CDISCPILOT01",
"metaDataVersionOID": "MDV.MSGv2.0.SDTMIG.3.3",
"metaDataRef": "define.xml",
"itemGroupOID": "IG.DD",
"records": 3,
"name": "DD",
"label": "Death Details",
"columns": [ ],
"rows": [ ]{
"datasetJSONCreationDateTime": "2024-07-30T09:38:42",
"datasetJSONVersion": "1.1.0",
"fileOID": "www.cdisc.org/StudyMSGv2/1/2024-07-30/dd",
"dbLastModifiedDateTime": "2020-08-21T09:14:25",
"originator": "CDISC SDTM MSG Team",
"sourceSystem": {"name": "Sponsor System", "version": "1.0"},
"studyOID": "cdisc.com/CDISCPILOT01",
"metaDataVersionOID": "MDV.MSGv2.0.SDTMIG.3.3",
"metaDataRef": "https://metadata.location.org/CDISCPILOT01/define.xml",
"itemGroupOID": "IG.DD",
"records": 3,
"name": "DD",
"label": "Death Details",
"columns": [ ],
"rows": [ ].ndjson as the extension
.json as the extension