Skip to content

A simple python program for viewing JSON data more clearly

License

Notifications You must be signed in to change notification settings

tksoftw/JsonTreeView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 

Repository files navigation

JsonTreeView

A simple python program for viewing JSON data more clearly

Installation

pip install jsontreeview

Usage

from jsontreeview import treeView
...
# Works for both dict and list types
treeView(obj, output="out.txt") # optional output file argument, default is stdout

Example

Input:

{"glossary":{"title":"exampleglossary","GlossDiv":{"title":"S","GlossList":{"GlossEntry":{"ID":"SGML","SortAs":"SGML","GlossTerm":"StandardGeneralizedMarkupLanguage","Acronym":"SGML","Abbrev":"ISO8879:1986","GlossDef":{"para":"Ameta-markuplanguage,usedtocreatemarkuplanguagessuchasDocBook.","GlossSeeAlso":["GML","XML"]},"GlossSee":"markup"}}}}}

Output:

["glossary"]:
 -["title"]: str
 -["GlossDiv"]:
  --["title"]: str
  --["GlossList"]:
   ---["GlossEntry"]:
    ----["ID"]: str
    ----["SortAs"]: str
    ----["GlossTerm"]: str
    ----["Acronym"]: str
    ----["Abbrev"]: str
    ----["GlossDef"]:
     -----["para"]: str
     -----["GlossSeeAlso"]:
      ----->[0]: str
      ----->[1]: str
    ----["GlossSee"]: str

About

A simple python program for viewing JSON data more clearly

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages