yggdrasil v3.3.2 Yggdrasil.Transformer.Json View Source

JSON Yggdrasil transformer using the library Jason.

Link to this section Summary

Functions

Decodes a JSON from a binary message. The channel is ignored

Encodes some data to a JSON binary. The channel is ignored

Link to this section Functions

Link to this function decode(channel, message) View Source
decode(Yggdrasil.Channel.t(), binary()) :: {:ok, map()} | {:error, term()}

Decodes a JSON from a binary message. The channel is ignored.

Link to this function encode(channel, message) View Source
encode(Yggdrasil.Channel.t(), binary()) :: {:ok, binary()} | {:error, term()}

Encodes some data to a JSON binary. The channel is ignored.