-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
da26fb2
commit 87acd8a
Showing
5 changed files
with
43 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { promisify } from "util"; | ||
import fs from "fs"; | ||
|
||
export class JsonReader { | ||
private fileName: string; | ||
private jsonData: any = ""; | ||
private readFile: any; | ||
|
||
constructor(fileName: string) { | ||
this.fileName = fileName; | ||
this.readFile = promisify(fs.readFile); | ||
this.jsonData = this.readJson(); | ||
} | ||
|
||
async readJson() { | ||
return await JSON.parse(this.readFile(this.fileName, "utf-8")); | ||
} | ||
|
||
//function to read a given path and return the data | ||
async getParamData(jsonPath: string) {} | ||
|
||
//function to return all element matching keyType & keyVal | ||
async getTabName() {} | ||
// | ||
|
||
async getParamLabels(jsonHierarchy: string) {} | ||
|
||
async getAllParamsInHierarchy(jsonHierarchy: string) {} | ||
|
||
async getEndPointNames() {} | ||
} |