> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-8c05c8a2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> Documentation for the JSONColumnsWithMetadata format

# JSONColumnsWithMetadata

| Input | Output | Alias |
| ----- | ------ | ----- |
| ✔     | ✔      |       |

<h2 id="description">
  Description
</h2>

Differs from the [`JSONColumns`](/reference/formats/JSON/JSONColumns) format in that it also contains some metadata and statistics (similar to the [`JSON`](/reference/formats/JSON/JSON) format).

<Note>
  The `JSONColumnsWithMetadata` format buffers all data in memory and then outputs it as a single block, so, it can lead to high memory consumption.
</Note>

<h2 id="example-usage">
  Example usage
</h2>

Example:

```json theme={null}
{
        "meta":
        [
                {
                        "name": "num",
                        "type": "Int32"
                },
                {
                        "name": "str",
                        "type": "String"
                },

                {
                        "name": "arr",
                        "type": "Array(UInt8)"
                }
        ],

        "data":
        {
                "num": [42, 43, 44],
                "str": ["hello", "hello", "hello"],
                "arr": [[0,1], [0,1,2], [0,1,2,3]]
        },

        "rows": 3,

        "rows_before_limit_at_least": 3,

        "statistics":
        {
                "elapsed": 0.000272376,
                "rows_read": 3,
                "bytes_read": 24
        }
}
```

For the `JSONColumnsWithMetadata` input format, if setting [`input_format_json_validate_types_from_metadata`](/reference/settings/formats#input_format_json_validate_types_from_metadata) is set to `1`,
the types from metadata in input data will be compared with the types of the corresponding columns from the table.

<h2 id="format-settings">
  Format settings
</h2>
