# Json.parse

Parses a JSON string, with support for `bigint`.

## Imports

:::code-group
```ts [Named]
import { Json } from 'ox'
```

```ts [Entrypoint]
import * as Json from 'ox/Json'
```
:::

## Examples

```ts twoslash
import { Json } from 'ox'

const json = Json.parse(
  '{"foo":"bar","baz":"69420694206942069420694206942069420694206942069420#__bigint"}'
)
// @log: {
// @log:   foo: 'bar',
// @log:   baz: 69420694206942069420694206942069420694206942069420n
// @log: }
```

## Definition

```ts
function parse(
  string: string,
  reviver?: (this: any, key: string, value: any) => any,
): any
```

**Source:** [src/core/Json.ts](https://github.com/wevm/ox/blob/main/src/core/Json.ts#L161)

## Parameters

### string

* **Type:** `string`

The value to parse.

### reviver

* **Type:** `(this: any, key: string, value: any) => any`
* **Optional**

A function that transforms the results.

## Return Type

The parsed value.

`any`
