Platforms to show: All Mac Windows Linux Cross-Platform

/Util/JSON/JSON To HTML


You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Util/JSON/JSON To HTML

This example is the version from Tue, 11th Dec 2023.

Project "JSON To HTML.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control JSONArea Inherits TextArea
ControlInstance JSONArea Inherits TextArea
EventHandler Sub TextChange() UpdateTimer.Mode = UpdateTimer.ModeSingle End EventHandler
End Control
Control HTMLArea Inherits TextArea
ControlInstance HTMLArea Inherits TextArea
End Control
Control web Inherits HTMLViewer
ControlInstance web Inherits HTMLViewer
End Control
Control UpdateTimer Inherits Timer
ControlInstance UpdateTimer Inherits Timer
EventHandler Sub Action() Update End EventHandler
End Control
EventHandler Sub Open() update End EventHandler
Sub Update() // parse JSON Dim j As New JSONMBS(JSONArea.Text) // make HTML Dim html As String = j.ToHTML // show it HTMLArea.Text = html // load to web viewer web.LoadPage(html, Nil) // if something goes wrong, we show in htmltext field Exception r As JSONException HTMLArea.Text = r.message End Sub
End Class
MenuBar MainMenuBar
MenuItem FileMenu = "&File"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem EditSeparator1 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "#App.kEditClear"
MenuItem EditSeparator2 = "-"
MenuItem EditSelectAll = "Select &All"
MenuItem HelpMenu = "&Help"
End MenuBar
Sign
End Sign
End Project

See also:

The items on this page are in the following plugins: MBS Util Plugin.


The biggest plugin in space...