Skip to content

Commit 822121f

Browse files
ADD: Demo JSON_Analyzer
1 parent 2d2ec04 commit 822121f

File tree

6 files changed

+486
-0
lines changed

6 files changed

+486
-0
lines changed

data_control/JSON_Analyzer/Readme.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# JSON_Analyzer
2+
3+
This demo shows how to use uJSON.pas and also provides a JSON Prettifier
4+
5+
![](preview.png)
6+
7+
Features:
8+
9+
- Prettyfy JSON Inpot
10+
- Show JSON data hierarchy as Class diagram
11+
- Search in JSON data
100 KB
Loading
+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<CONFIG>
3+
<ProjectOptions>
4+
<Version Value="12"/>
5+
<PathDelim Value="\"/>
6+
<General>
7+
<Flags>
8+
<CompatibilityMode Value="True"/>
9+
</Flags>
10+
<SessionStorage Value="InProjectDir"/>
11+
<Title Value="project1"/>
12+
<Scaled Value="True"/>
13+
<ResourceType Value="res"/>
14+
<UseXPManifest Value="True"/>
15+
<XPManifest>
16+
<DpiAware Value="True"/>
17+
</XPManifest>
18+
</General>
19+
<BuildModes Count="1">
20+
<Item1 Name="Default" Default="True"/>
21+
</BuildModes>
22+
<PublishOptions>
23+
<Version Value="2"/>
24+
<UseFileFilters Value="True"/>
25+
</PublishOptions>
26+
<RunParams>
27+
<FormatVersion Value="2"/>
28+
</RunParams>
29+
<RequiredPackages Count="1">
30+
<Item1>
31+
<PackageName Value="LCL"/>
32+
</Item1>
33+
</RequiredPackages>
34+
<Units Count="4">
35+
<Unit0>
36+
<Filename Value="project1.lpr"/>
37+
<IsPartOfProject Value="True"/>
38+
</Unit0>
39+
<Unit1>
40+
<Filename Value="unit1.pas"/>
41+
<IsPartOfProject Value="True"/>
42+
<ComponentName Value="Form1"/>
43+
<HasResources Value="True"/>
44+
<ResourceBaseClass Value="Form"/>
45+
<UnitName Value="Unit1"/>
46+
</Unit1>
47+
<Unit2>
48+
<Filename Value="..\..\uJSON.pas"/>
49+
<IsPartOfProject Value="True"/>
50+
</Unit2>
51+
<Unit3>
52+
<Filename Value="..\..\uncommenter.pas"/>
53+
<IsPartOfProject Value="True"/>
54+
</Unit3>
55+
</Units>
56+
</ProjectOptions>
57+
<CompilerOptions>
58+
<Version Value="11"/>
59+
<PathDelim Value="\"/>
60+
<Target>
61+
<Filename Value="project1"/>
62+
</Target>
63+
<SearchPaths>
64+
<IncludeFiles Value="$(ProjOutDir)"/>
65+
<OtherUnitFiles Value="..\..\Projects\Sample\DatenSteuerung\synapse;..\.."/>
66+
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
67+
</SearchPaths>
68+
<Linking>
69+
<Options>
70+
<Win32>
71+
<GraphicApplication Value="True"/>
72+
</Win32>
73+
</Options>
74+
</Linking>
75+
<Other>
76+
<CompilerMessages>
77+
<IgnoredMessages idx5024="True"/>
78+
</CompilerMessages>
79+
</Other>
80+
</CompilerOptions>
81+
<Debugging>
82+
<Exceptions Count="3">
83+
<Item1>
84+
<Name Value="EAbort"/>
85+
</Item1>
86+
<Item2>
87+
<Name Value="ECodetoolError"/>
88+
</Item2>
89+
<Item3>
90+
<Name Value="EFOpenError"/>
91+
</Item3>
92+
</Exceptions>
93+
</Debugging>
94+
</CONFIG>
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
(******************************************************************************)
2+
(* *)
3+
(* Author : Uwe Schächterle (Corpsman) *)
4+
(* *)
5+
(* This file is part of JSON Analyzer *)
6+
(* *)
7+
(* See the file license.md, located under: *)
8+
(* https://github.com/PascalCorpsman/Software_Licenses/blob/main/license.md *)
9+
(* for details about the license. *)
10+
(* *)
11+
(* It is not allowed to change or remove this text from any *)
12+
(* source file of the project. *)
13+
(* *)
14+
(******************************************************************************)
15+
Program project1;
16+
17+
{$MODE objfpc}{$H+}
18+
19+
Uses
20+
{$IFDEF UNIX}{$IFDEF UseCThreads}
21+
cthreads,
22+
{$ENDIF}{$ENDIF}
23+
Interfaces, // this includes the LCL widgetset
24+
Forms, Unit1
25+
{ you can add units after this };
26+
27+
{$R *.res}
28+
29+
Begin
30+
RequireDerivedFormResource := True;
31+
Application.Scaled := True;
32+
Application.Initialize;
33+
Application.CreateForm(TForm1, Form1);
34+
Application.Run;
35+
End.
36+

data_control/JSON_Analyzer/unit1.lfm

+125
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
object Form1: TForm1
2+
Left = 332
3+
Height = 730
4+
Top = 122
5+
Width = 861
6+
Caption = 'Form1'
7+
ClientHeight = 730
8+
ClientWidth = 861
9+
OnCreate = FormCreate
10+
Position = poScreenCenter
11+
LCLVersion = '2.3.0.0'
12+
object Memo1: TMemo
13+
Left = 8
14+
Height = 648
15+
Top = 32
16+
Width = 456
17+
Anchors = [akTop, akLeft, akRight, akBottom]
18+
Font.Name = 'Courier New'
19+
Lines.Strings = (
20+
'{'
21+
' "user:info": {'
22+
' "username":"Corpsman",'
23+
' "referenceCode":"Blubber",'
24+
' "userType":"Normal",'
25+
' "isLoggedIn":true,'
26+
' "dateFormat":"dd.MM.yyyy",'
27+
' "unitSetName":"Metric",'
28+
' "roles":'
29+
' ['
30+
' "Public",'
31+
' "Premium"'
32+
' ],'
33+
' "publicGuid":"424242-4242-4242-4242-424224",'
34+
' "avatarUrl":"https:\/\/img.geocaching.com\/avatar\/424242-4242-4242-4242-424224.png"'
35+
' },'
36+
' "app:options": {'
37+
' "localRegion":"en-US",'
38+
' "coordInfoUrl":"https:\/\/coord.info",'
39+
' "paymentUrl":"https:\/\/payments.geocaching.com"'
40+
' }'
41+
'}'
42+
)
43+
ParentFont = False
44+
ScrollBars = ssAutoBoth
45+
TabOrder = 0
46+
WordWrap = False
47+
end
48+
object Label1: TLabel
49+
Left = 16
50+
Height = 15
51+
Top = 10
52+
Width = 120
53+
Caption = 'Paste your JSON Code:'
54+
ParentColor = False
55+
end
56+
object Button1: TButton
57+
Left = 8
58+
Height = 25
59+
Top = 700
60+
Width = 75
61+
Anchors = [akLeft, akBottom]
62+
Caption = 'Analyze'
63+
OnClick = Button1Click
64+
TabOrder = 1
65+
end
66+
object TreeView1: TTreeView
67+
Left = 480
68+
Height = 648
69+
Top = 32
70+
Width = 369
71+
Anchors = [akTop, akRight, akBottom]
72+
ShowSeparators = False
73+
TabOrder = 2
74+
end
75+
object Button2: TButton
76+
Left = 775
77+
Height = 25
78+
Top = 694
79+
Width = 75
80+
Anchors = [akRight, akBottom]
81+
Caption = 'Close'
82+
OnClick = Button2Click
83+
TabOrder = 3
84+
end
85+
object Label2: TLabel
86+
Left = 96
87+
Height = 15
88+
Top = 702
89+
Width = 47
90+
Anchors = [akLeft, akBottom]
91+
Caption = 'Findpath'
92+
ParentColor = False
93+
end
94+
object Button3: TButton
95+
Left = 472
96+
Height = 25
97+
Top = 694
98+
Width = 75
99+
Anchors = [akLeft, akBottom]
100+
Caption = 'Search'
101+
OnClick = Button3Click
102+
TabOrder = 4
103+
end
104+
object ComboBox1: TComboBox
105+
Left = 152
106+
Height = 23
107+
Top = 702
108+
Width = 312
109+
Anchors = [akLeft, akBottom]
110+
ItemHeight = 15
111+
TabOrder = 5
112+
Text = 'ComboBox1'
113+
end
114+
object CheckBox1: TCheckBox
115+
Left = 8
116+
Height = 19
117+
Top = 680
118+
Width = 120
119+
Anchors = [akLeft, akBottom]
120+
Caption = 'Support comments'
121+
Checked = True
122+
State = cbChecked
123+
TabOrder = 6
124+
end
125+
end

0 commit comments

Comments
 (0)