Bolty.ResponseEncoder.Json.Poison (Bolty v0.0.10)

Copy Markdown

A default implementation for Poison encoding library. More info about poison here: https://hex.pm/packages/poison

Allow this usage:

conn = Bolty.conn()
{:ok, res} = Bolty.query(conn, "MATCH (t:TestNode) RETURN t")
Poison.encode!(res)

Default implementation can be overriden by providing your own implementation.

More info about implementation: https://hexdocs.pm/poison/Poison.html#module-encoder

Note:

In order to benefit from Bolty.ResponseEncoder implementation, use Bolty.ResponseEncoder.Json.encode and pass the result to the Poison encoding functions.