Add JSON serialization of datagrids.
Review Request #14819 — Created Feb. 16, 2026 and updated
Datagrids can now be serialized to JSON, providing information on active
and available columns, pagination, sorting information, rows, and each
cell within. The cells contain both rendered HTML (the<td>and
everything inside) and a JSON value for processing.This can be used to provide datagrid functionality in other contexts.
The primary purpose at this time is to enable API access to datagrids.
The information can be returned as-is or further processed to provide
a more integrated response into an API response format.Columns can provide an explicit JSON value alongside rendered HTML. Both
now default to making use of a newget_raw_object_value(), which can
provide a suitable value from an object. This is intended for column
implementations to override and use as necessary, and to simplify common
code used forrender_data()andto_json().
Unit tests pass.
| Summary | ID |
|---|---|
| 3fbcb7f5fd9f71ed1c49e2acb314f30950c8121b |