These are chat archives for argonaut-io/argonaut

Nov 2017
Lehel Iszlai
Nov 22 2017 20:25

Hey guys I have a really basic question,
for a basic webhook thing I'd like to parse json partially and keep a field as string

   val rawJson: String ="""
  "url": "http://bar",
  "method": "GET",
  "body": "{"tucsfoo":""}",
  "cronExpression": "* * * * *"
case class CronTask(url: String, method: String, body: String, cronExpression: String)

object CronTask {
  import argonaut._, Argonaut._
  implicit def PersonCodecJson: CodecJson[CronTask] =
    casecodec4(CronTask.apply, CronTask.unapply)("url", "method", "body", "cronExpression")

I would love to get back the body as a string, how would i do that?