aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuicommon/domain/TextJson.scala
blob: ee4d8844bdaebbcd2d594aa005b85bcb9bba98b0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package xyz.driver.pdsuicommon.domain

import xyz.driver.pdsuicommon.logging._

final case class TextJson[+T](content: T) {
  def map[U](f: T => U): TextJson[U] = copy(f(content))
}

object TextJson {

  implicit def toPhiString[T](x: TextJson[T])(implicit inner: T => PhiString): PhiString = {
    phi"TextJson(${x.content})"
  }
}