How to get json result as raw binary from Postgres Query

If you’re using jason, you can use Jason.Fragment.new(iodata) which was designed especially for that use case. The docs are… a bit lacking :sweat_smile:.

This basically implements exactly what I described in my blog post about doing something similar in Poison.