Skip to content

deserialize

Deserialize function that supports bigint and Map.

Import

ts
import { deserialize } from '@wagmi/core'
import { deserialize } from '@wagmi/core'

Usage

ts
import { deserialize } from '@wagmi/core'

const result = deserialize('{"foo":"wagmi","bar":{"__type":"bigint","value":"123"}}')
import { deserialize } from '@wagmi/core'

const result = deserialize('{"foo":"wagmi","bar":{"__type":"bigint","value":"123"}}')

Parameters

value

string

The string to deserialze.

reviver

(key: string, value: any) => any

A custom reviver function for handling standard values.

Return Type

unknown

Parsed value.

Released under the MIT License.