OpenObserve Docs
User GuideAnalyticsDashboardsConfig

Show Field as JSON

Updated View MarkdownOpen in ChatGPTOpen in Claude

This guide describes how to use the Show Field as JSON option in OpenObserve dashboards to render a field's value as structured, colored JSON in table panels. This setting improves readability when a field contains JSON data, such as logs-derived fields.

Supported Panel Type

The Show Field as JSON setting is available only for the following panel type:

  • Table

It can be turned on for any field added to a table panel. Only its default value depends on where the panel is built (see below).


Configure the Show Field as JSON Option

To configure the Show Field as JSON option:

  1. In the Panel Editor, select the Table panel type.

  2. Add a field to the query using the query builder.

  3. Click the field in the query builder to open its options, and locate the Render Data as JSON / Array checkbox (internally referred to as the "show field as JSON" option).

  4. Use the Render Data as JSON / Array checkbox:

    • When enabled, the field's value is rendered as structured, colored JSON in the table panel. Values that are objects or arrays are formatted and color-coded for easier reading.
    • When disabled, the field's value is rendered as plain text.

Default Behavior and Environment Variable

The default state of the Render Data as JSON / Array checkbox is determined by the following environment variable:

ZO_DASHBOARD_SHOW_FIELD_AS_JSON_ENABLED=false  # default
  • When set to true, the Render Data as JSON / Array checkbox defaults to selected for fields added in the Timechart view of the Logs page (shown when ZO_TIMECHART_ENABLED=true).
  • When set to false, the checkbox defaults to cleared for those fields.

This environment-variable-driven default applies only to fields added in the Timechart view of the Logs page. Fields added in the dashboard panel editor or in the Visualize view of the Logs page default to cleared regardless of the environment variable value. In all cases, you can manually change the setting for any field regardless of the environment variable value.


Limitations

The Show Field as JSON option is supported only in Table panels. Plain values that are not valid JSON objects or arrays are rendered as plain text even when the toggle is enabled.

Next steps

Need some help?

Was this page helpful?

On this page