Skip to content

Function: jsonQueueCodec() ​

jsonQueueCodec(): QueueCodec

The JSON codec of the queues (the UTF-8 bytes of the JSON text), for the services written in other languages: the same normalization as messagePackQueueCodec.

Returns ​

QueueCodec

The codec.

Example ​

typescript
import {jsonQueueCodec} from '@lakutata/queue'

const codec = jsonQueueCodec()
console.log(new TextDecoder().decode(codec.encode({id: 7}))) //{"id":7}

Released under the MIT License.