Skip to content

A pure vanilla json viewer for trials

Notifications You must be signed in to change notification settings

oncokb/trial-viewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TrialViewer

TrialViewer is a vanilla JavaScript tool for visualising trial JSON data. We use JSONViewer to display json structure.

Demo Site: oncokb.github.io/trial-viewer

Development

  1. Create new instance of JSONViewer object.
    var jsonViewer = new JSONViewer();
  2. Append instance container to the DOM using "getContainer()" method.
    document.querySelector("#json").appendChild(jsonViewer.getContainer());
  3. Visualise json using "showJSON()" method, which accepts 3 arguments - json file, optional: visualise to max level (-1 unlimited, 0..n), optional: collapse all at level (-1 unlimited, 0..n).
    jsonViewer.showJSON(jsonObj); // visualize the whole json structure.
    jsonViewer.showJSON(jsonObj, 1); // visualise json to max level 1.
    jsonViewer.showJSON(jsonObj, null, 1); // collapse all at level 1.

About

A pure vanilla json viewer for trials

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published