# JSON

**json** 解析器是最简单的选择: 如果原始日志源是 JSON 格式的字符串，它将采用其结构并将其直接转换为内部二进制表示形式。

在默认解析器配置文件中可以找到一个简单的配置，该记录是解析 Docker 日志文件的记录(当使用 tail 输入插件时)：

```python
[PARSER]
    Name        docker
    Format      json
    Time_Key    time
    Time_Format %Y-%m-%dT%H:%M:%S %z
```

对于上述定义的解析器，以下日志记录是的有效内容:

```javascript
{"key1": 12345, "key2": "abc", "time": "2006-07-28T13:22:04Z"}
```

处理后，其内部表示将为:

```
[1154103724, {"key1"=>12345, "key2"=>"abc"}]
```

*time* 字段已转换为 Unix 时间戳(UTC)，并且映射由原始消息转换为每个组成部分


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hulining.gitbook.io/fluentbit/pipeline/parsers/json.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
