Conduit v0.1.0 Conduit.ContentType.JSON
Handles converting a message body to and from JSON.
Summary
Functions
Formats the message body to json and sets the content type
Parses the message body from json and sets the content type
Functions
Formats the message body to json and sets the content type.
Examples
iex> import Conduit.Message
iex> message =
iex> %Conduit.Message{}
iex> |> put_body(%{})
iex> |> Conduit.ContentType.JSON.format([])
iex> message.body
"{}"
iex> get_meta(message, :content_type)
"application/json"