Whenever I encode something into JSON, like a map (see below), I get the following issue.
Poison.encode!(%{
"2013-02-10 00:00:00 -0800": 11,
"2013-02-11 00:00:00 -0800": 6,
"2013-02-12 00:00:00 -0800": 3,
"2013-02-13 00:00:00 -0800": 2,
"2013-02-14 00:00:00 -0800": 5,
"2013-02-15 00:00:00 -0800": 3,
"2013-02-16 00:00:00 -0800": 8,
"2013-02-17 00:00:00 -0800": 6,
"2013-02-18 00:00:00 -0800": 6,
"2013-02-19 00:00:00 -0800": 12,
"2013-02-20 00:00:00 -0800": 5,
"2013-02-21 00:00:00 -0800": 5,
"2013-02-22 00:00:00 -0800": 3,
"2013-02-23 00:00:00 -0800": 1,
"2013-02-24 00:00:00 -0800": 10,
"2013-02-25 00:00:00 -0800": 1,
"2013-02-26 00:00:00 -0800": 3,
"2013-02-27 00:00:00 -0800": 2,
"2013-02-28 00:00:00 -0800": 3,
"2013-03-01 00:00:00 -0800": 2,
"2013-03-02 00:00:00 -0800": 8
})
The error I get:
protocol String.Chars not implemented for {:safe, "<div id=\"9cc16e3a-3435-4d08-a4ec-ec10d10cb1a1\" style=\"height: 300px; text-align: center; color: #999; line-height: 300px; font-size: 14px; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, Arial, Helvetica, sans-serif;\">Loading...</div>\n<script type=\"text/javascript\">new Chartkick.LineChart('9cc16e3a-3435-4d08-a4ec-ec10d10cb1a1', {\"2013-03-02 00:00:00 -0800\":8,\"2013-03-01 00:00:00 -0800\":2,\"2013-02-28 00:00:00 -0800\":3,\"2013-02-27 00:00:00 -0800\":2,\"2013-02-26 00:00:00 -0800\":3,\"2013-02-25 00:00:00 -0800\":1,\"2013-02-24 00:00:00 -0800\":10,\"2013-02-23 00:00:00 -0800\":1,\"2013-02-22 00:00:00 -0800\":3,\"2013-02-21 00:00:00 -0800\":5,\"2013-02-20 00:00:00 -0800\":5,\"2013-02-19 00:00:00 -0800\":12,\"2013-02-18 00:00:00 -0800\":6,\"2013-02-17 00:00:00 -0800\":6,\"2013-02-16 00:00:00 -0800\":8,\"2013-02-15 00:00:00 -0800\":3,\"2013-02-14 00:00:00 -0800\":5,\"2013-02-13 00:00:00 -0800\":2,\"2013-02-12 00:00:00 -0800\":3,\"2013-02-11 00:00:00 -0800\":6,\"2013-02-10 00:00:00 -0800\":11}, {});</script>\n"} of type Tuple. This protocol is implemented for the following type(s): Postgrex.Copy, Postgrex.Query, Decimal, Float, DateTime, Time, List, Version.Requirement, Atom, Integer, Version, Date, BitString, NaiveDateTime, URI