Skip to content

Terminal-based JSON structure visualization. Originally made to model directory trees, so it does not output typical JSON representation (array elements are either optionally parented under index item or parented under parent array item)

Notifications You must be signed in to change notification settings

tomkeus/console-tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Console Tree

Outputs tree structures to terminal output, based on input JSON data.

Example

{
    "intProp": 0,
    "floatProp": 0.2,
    "strProp": "xyz",
    "boolProp": true,
    "objProp": {
        "intProp": 1,
        "strProp": "2"
    },
    "strArrayProp": [
        "@val:1",
        "@val:2"
    ],
    "intArrayProp": [
        -1,
        -1,
        -1,
        -1
    ]
}

Produced output in full mode

example.json                         
├───────────intProp                  
│           └───────────0            
├───────────floatProp                
│           └───────────0.2          
├───────────strProp                  
│           └───────────xyz          
├───────────boolProp                 
│           └───────────True         
├───────────objProp                  
│           ├───────────intProp      
│           │           └──────1     
│           └───────────strProp      
│                       └──────2     
├───────────strArrayProp             
│           ├───────────0            
│           │           └──────@val:1
│           └───────────1            
│                       └──────@val:2
└───────────intArrayProp             
            ├───────────0            
            │           └──────-1    
            ├───────────1            
            │           └──────-1    
            ├───────────2            
            │           └──────-1    
            └───────────3            
                        └──────-1     

Produced output in simple mode

example.json                    
├───────────intProp             
│           └───────────0       
├───────────floatProp           
│           └───────────0.2     
├───────────strProp             
│           └───────────xyz     
├───────────boolProp            
│           └───────────True    
├───────────objProp             
│           ├───────────intProp 
│           │           └──────1
│           └───────────strProp 
│                       └──────2
├───────────strArrayProp        
│           ├───────────@val:1  
│           └───────────@val:2  
└───────────intArrayProp        
            ├───────────-1      
            ├───────────-1      
            ├───────────-1      
            └───────────-1      

About

Terminal-based JSON structure visualization. Originally made to model directory trees, so it does not output typical JSON representation (array elements are either optionally parented under index item or parented under parent array item)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages