Skip to main content
Version: v2.0.2

StudyConfig

Defined in: parser/types.ts:1284

The StudyConfig interface is used to define the properties of a study configuration. This is a JSON object with four main components: the StudyMetadata, the UIConfig, the Components, and the Sequence. Below is the general template that should be followed when constructing a Study configuration file.

{
"$schema": "https://raw.githubusercontent.com/revisit-studies/study/main/src/parser/StudyConfigSchema.json",
"studyMetadata": {
...
},
"uiConfig": {
...
},
"components": {
...
},
"sequence": {
...
}
}
info

For information about each of the individual pieces of the study configuration file, you can visit the documentation for each one individually.


The $schema line is used to verify the schema. If you're using VSCode (or other similar IDEs), including this line will allow for autocomplete and helpful suggestions when writing the study configuration.

Properties

PropertyTypeDescriptionDefined in
$schemastringA required json schema property. This should point to the github link for the version of the schema you would like. The $schema line is used to verify the schema. If you're using VSCode (or other similar IDEs), including this line will allow for autocomplete and helpful suggestions when writing the study configuration. See examples for more informationparser/types.ts:1286
baseComponents?BaseComponentsThe base components that are used in the study. These components can be used to template other components. See BaseComponents for more information.parser/types.ts:1294
componentsRecord<string, IndividualComponent | InheritedComponent>The components that are used in the study. They must be fully defined here with all properties. Some properties may be inherited from baseComponents.parser/types.ts:1296
importedLibraries?string[]A list of libraries that are used in the study. This is used to import external libraries into the study. Library names are valid namespaces to be used later.parser/types.ts:1292
sequenceComponentBlockThe order of the components in the study. This might include some randomness.parser/types.ts:1298
studyMetadataStudyMetadataThe metadata for the study. This is used to identify the study and version in the data file.parser/types.ts:1288
uiConfigUIConfigThe UI configuration for the study. This is used to configure the UI of the app.parser/types.ts:1290