YTWJSONE ;SLC/KCM - Simple Editor for JSON Instrument Spec ; 7/20/2018
Source file <YTWJSONE.m>
| Name | Comments | DBIA/ICR reference | 
|---|---|---|
| EN | ; edit instrument Entry Specification
 | 
|
| LOOKUP() | ; return 601.712 IEN for selected instrument
 | 
|
| EDIT(TESTNM) | ; edit copy of document in ^TMP("YTQ-EDIT",$J,
 | 
|
| HASMODS(SPEC) | ; return 1 if edited version differs from 601.712
 | 
|
| OKSAVE() | ; return 1 if OK to save changes
 | 
|
| EOP() | ; return 1 if continue, 0 if exit
 | 
|
| CHKSPEC(SRC,ERRS,CRC) | ; parses JSON and calculates checksum
 ; .ERRS: returns 1 if JSON parses without errors ; .CRC: returns checksum  | 
|
| FIXLF(SRC,DEST) | ; Load spec from SRC, cleaning up line feeds
 ; SPEC: reference to global with original JSON ; DEST: reference to global root for destination JSON  | 
|
| CHKJSON(JSON,TREE,ERRS) | ; decode JSON and display any errors
 ; JSON: reference to JSON global ; TREE: reference to TREE global ; .ERRORS: return errors found or 0  | 
|
| NAMEVAL(TREE,LIST) | ; Convert TREE to external object name/value list in LIST
 ; TREE: reference to global containing documents tree structure ; LIST: reference to global where @LIST@(name)=value will be saved ; NOTE -- resulting names will collate as string, so the order may be odd ; for example, obj[1], obj[10], obj[11], obj[2], etc.  | 
|
| JSONSTR(X) | ; return 1 if should be treated as a string
 | 
|
| NVCRC(LIST) | ; return CRC32 for LIST(name)=value
 ; LIST: reference to global containing @LIST@(name)=value pairs  | 
|
| TSCRC() | ; return CRC32 of all checksums for active instruments
 | 
|
| SHA1ALL() | ; return SHA-1 of all checksums for active instruments
 | 
|
| SAVE712(IEN,CRC) | ; save updated specification to 601.712
 ; expects ^TMP("YTQ-EDIT,$J,n,0) to be entry spec text  | 
|
| VALIDATE | ; compare CRC with actual and check JSON structure
 | 
|
| FILE(TEST,PATH) | ; write JSON from 601.712 to host file in PATH
 | 
|
| LOAD(TEST,PATH) | ; read host file in PATH and load into 601.712
 | 
| Name | Line Occurrences | 
|---|---|
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| FileNo | Call Tags | 
|---|---|
| ^YTT(601.712 - [#601.712] | Classic Fileman Calls |