Skip to content

Module dev_codec_json.erl

A simple JSON codec for HyperBEAM's message format.

Description

Takes a message as TABM and returns an encoded JSON string representation. This codec utilizes the httpsig@1.0 codec for signing and verifying.

Function Index

commit/3
committed/3
content_type/1Return the content type for the codec.
deserialize/3Deserialize the JSON string found at the given path.
from/3Decode a JSON string to a message.
serialize/3Serialize a message to a JSON string.
to/3Encode a message to a JSON string.
verify/3

Function Details

commit/3

commit(Msg, Req, Opts) -> any()

committed/3

committed(Msg, Req, Opts) -> any()

content_type/1

content_type(X1) -> any()

Return the content type for the codec.

deserialize/3

deserialize(Base, Req, Opts) -> any()

Deserialize the JSON string found at the given path.

from/3

from(Map, Req, Opts) -> any()

Decode a JSON string to a message.

serialize/3

serialize(Base, Msg, Opts) -> any()

Serialize a message to a JSON string.

to/3

to(Msg, Req, Opts) -> any()

Encode a message to a JSON string.

verify/3

verify(Msg, Req, Opts) -> any()