# unpack() function · @imqueue/pg-pubsub

Source: https://imqueue.org/api/pg-pubsub/latest/pg-pubsub.unpack/
Published: 2026-08-01
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/pg-pubsub 3.0.5 — generated reference, not hand-written

Deserializes given input JSON string to corresponding JSON value object. On error will return empty object

**Signature:**

```typescript
export declare function unpack(input?: string, logger?: AnyLogger): AnyJson;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| input | string | _(Optional)_ string to deserialize |
| logger | [AnyLogger](https://imqueue.org/api/pg-pubsub/latest/pg-pubsub.anylogger/) | _(Optional)_ logger to handle errors logging with |


**Returns:**

[AnyJson](https://imqueue.org/api/pg-pubsub/latest/pg-pubsub.anyjson/)

