HED JavaScript Library
    Preparing search index...

    Class BidsJsonFile

    A BIDS JSON file.

    Hierarchy (View Summary)

    Index

    Constructors

    • Constructor for a BIDS JSON file.

      Note: This class is used for non-sidecars such as dataset_description.json and does not have a validation method.

      Parameters

      • name: string

        The name of the JSON file.

      • file: any

        The file object representing this file.

      • jsonData: any

        The JSON data for this file.

      Returns BidsJsonFile

    Properties

    file: any

    The Object representing this file data. This is used to generate BidsHedIssue objects.

    jsonData: any

    This file's JSON data.

    name: string

    The name of this file.

    Accessors

    • get hasHedData(): boolean

      Determine whether this file has any HED data.

      Returns boolean

    • get isTimelineFile(): boolean

      Whether this is a TSV file timeline file.

      Returns boolean

    • get validatorClass(): Function

      The validator class used to validate this file.

      Returns Function

      The validator class used to validate this file.

    Methods

    • Parse a BIDS JSON file from a BIDS dataset path.

      Parameters

      • datasetRoot: string

        The root path of the dataset.

      • relativePath: string

        The relative path of the file within the dataset.

      Returns Promise<BidsJsonFile>

      The built JSON file object.

    • Read a BIDS file from a path.

      Parameters

      • filePath: string

        The actual path of the file.

      Returns Promise<any[]>

      A Promise that resolves to a two-element array containing the file contents and a mocked BIDS-type file object.

    • Read a BIDS file from a relative path within a dataset.

      Parameters

      • datasetRoot: string

        The root path of the dataset.

      • relativePath: string

        The relative path of the file within the dataset.

      Returns Promise<any[]>

      A Promise that resolves to a two-element array containing the file contents and a mocked BIDS-type file object.