Reference Field Reference
fields.json()
Raw JSON field for arbitrary structured data. Deprecated: Strife Studio shows it only as a plain text box; use fields.html() instead.
Raw JSON field ("Rich Content (JSON)" in the Studio field reference). Maps to editor { name: 'str-textarea', type: 'json' }. The stored value is arbitrary JSON, so the generated read type is unknown — narrow it at the call site.
Deprecated: do not use in new schemas. This editor was never fully implemented: Strife Studio shows it only as a plain text box, without JSON formatting, and the new interface has no case for it. No real template uses it today. It's kept only for backward compatibility with existing fields.json() calls and is expected to be removed in a future major version. Use fields.html() for rich content, or a typed field, instead.
Example
fields.json({
label: 'Raw config',
})Options
| Option | Type | Required | Description |
|---|---|---|---|
label | string | Yes | Label shown to editors in Strife Studio. |
description | string | No | Not shown in Studio's editor panel. |
searchable | boolean | No | Stored on the template; nothing uses it today. |
filterable | boolean | No | Stored on the template; nothing uses it today. |
protected | boolean | No | Stops the field from being edited or removed in Studio's template designer. No effect in the editor panel. |
propertyName | string | No | Override the stored property name. |
placeholder | string | null | No | Hint text shown when the editor is empty. |
No localizable option.
Output type
unknown — cast or validate before use.
See also
- Rich Content (JSON): the same editor, documented from the Strife Studio UI side.