Skip to main content

Component | JSON

Render a formatted JSON object.

ui.json({
"first": "John",
"last": "Doe",
"age": 50,
"address": {
"street": "123 Main St",
"city": "Anytown",
"state": "CA",
"zip": "12345"
}
})

API reference

Function signature

ui.json(
json: object,
options: Partial<{
style: Style | null
}>
)

Parameters

json

required object
The JSON object to be rendered.

properties.style

optional Style

Directly style the underlying element using CSS. See the styling guide for more details on available style properties.