<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@easyops-cn/brick-next-pipes](./brick-next-pipes.md) &gt; [jsonStringify](./brick-next-pipes.jsonstringify.md)

## jsonStringify() function

将一个值转换为 JSON 格式的字符串（序列化）。

 Serialization

**Signature:**

```typescript
export declare function jsonStringify(value: unknown, indent?: number): string;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  value | unknown | 输入值。 |
|  indent | number | 空格缩进数量（默认为 <code>2</code>）。 |

**Returns:**

string

序列化后的字符串；如果序列化失败（例如包含循环引用）返回 `undefined`<!-- -->。

