JSON

JSON component display the JSON representation of an object.

API

func JSON(c *tgframe.Container, v any)
  • c is Parent container.
  • v is the object.

Example

type DemoJSONHeader struct {
	Type int
}

type DemoJSON struct {
	Header   DemoJSONHeader
	IntValue int
	URL      string
	IsOk     bool
}

tgcomp.JSON(p.Main, &DemoJSON{})

JSON component