How does circe parse a generic type object to Json?
<p>Here is what I am trying to do</p>

<pre><code>case class MessageModel (time: Long, content: String) {}
val message = MessageModel(123, "Hello World")
def jsonParser[A] (obj: A) : String = obj.asJson.noSpaces

println jsonParser[MessageModel](message)
</code></pre>

<p>this doesn't work, because it will complain 
Error:(13, 8) could not find implicit value for parameter encoder: io.circe.Encoder[A]  obj.asJson.noSpaces
      ^</p>

<p>I kind of understand why it is happening, but is there a way to work around it? </p>

<p>Thanks </p>