JSON
JSON component display the JSON representation of an object.
API
func JSON(c *tgframe.Container, v any)
cis Parent container.vis the object.- string: assume to be a serialized JSON string.
 - other: assume to be a struct and will be converted to a JSON string.
 
Example
type DemoJSONHeader struct {
	Type int
}
type DemoJSON struct {
	Header   DemoJSONHeader
	IntValue int
	URL      string
	IsOk     bool
}
tgcomp.JSON(p.Main, &DemoJSON{})
