Site icon Embarcadero RAD Studio, Delphi, & C++Builder Blogs

Visualize JSON using TTreeView

Author: h.mohri

I tried a program that reads a JSON file in C++Builder VCL and displays it in TTreeView component.

This project file is open to public from github.

github.com/mojeld 

https://www.microsoft.com/store/productid/9PLPHK05PJF7

 


 

Place two TSpeedButton, TTreeView, TMemo, TActivityIndicator, TOpenDialog, TImageList.

ImageList1 has an icon for displaying in TreeView1

 

 

 

[code]


Create an event to read a JSON file and an event to read a character string contained in the clipboard.

[crayon-6636a0321fac1090125159/]

 

 

 

[Read JSON and add it to TreeView 1->Items]


Code to add from JSON string to ”TreeView 1->Items” using TJsonTextReader.

[crayon-6636a0321facb424191984/]

 

 

 

Exit mobile version