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/1 | Return the content type for the codec. |
deserialize/3 | Deserialize the JSON string found at the given path. |
from/3 | Decode a JSON string to a message. |
serialize/3 | Serialize a message to a JSON string. |
to/3 | Encode 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()