Use an embedded viewer with DICOM JSON

I’m trying to load dicom images into a react embedded viewer. To embed the viewer I followed the steps described in the docs.

However, I cannot find the settings to load studies using a DICOM JSON file. As described here, you should should pass a dicomjson url parameter leading to a file path, however how can I pass the JSON file to the embedded viewer?

Here is a minimal working example of the viewer embedded into a react application:

Passing the file-url to the routerBasename config argument unfortunately does not work:

const ohifViewerConfig = {
    routerBasename: "/dicomjson?url=https://ohif-dicom-json-example.s3.amazonaws.com/LIDC-IDRI-0001.json",
    servers: {}
  };

Thank you for your help!

The DataSource Module seems to have a function to define a jsondicom datasource. Is this the way to go?

import { DicomJSONDataSource } from "@ohif/core";

const getDataSourcesModule = () => [
    {
      name: "exampleDataSource",
      type: "jsonApi",
      createDataSource: DicomJSONDataSource
    }
  ];

Thanks again