---
title: "Format.json ViewHelper <f:format.json>"
manual: "Fluid ViewHelper Reference"
version: "main"
permalink: "https://docs.typo3.org/permalink/t3viewhelper:typo3fluid-fluid-format-json@main"
source: "Global/Format/Json.rst"
rendered: "2026-09-27T06:54:49+00:00"
---

# Format.json ViewHelper `<f:format.json>` {#typo3fluid-fluid-format-json}

Wrapper for PHPs `json_encode` function.
See [https://www.php.net/manual/function.json-encode.php](https://www.php.net/manual/function.json-encode.php).

Go to the source code of this ViewHelper: [Format\\JsonViewHelper.php (GitHub)](https://github.com/TYPO3/Fluid/blob/main/src/ViewHelpers/Format/JsonViewHelper.php).

## Arguments of the `<f:format.json>` ViewHelper {#typo3fluid-fluid-format-json-arguments}

-   **forceObject**

    -   *Type:* bool
    -   *Default:* false

    Outputs an JSON object rather than an array

-   **value**

    -   *Type:* mixed

    The incoming data to convert, or null if VH children should be used
