Skip to content

Latest commit

 

History

History
20 lines (12 loc) · 867 Bytes

MARSHALLER.md

File metadata and controls

20 lines (12 loc) · 867 Bytes

Json Marshaller

Testkit comes out of the box with a default Jackson json marshaller preloaded with (Scala Module, JDK8, Java Time, JodaTime)

It can also allow you to create your own custom marshaller:

    val myMarshaller = new com.wix.e2e.http.api.Marshaller {
      def unmarshall[T : Manifest](jsonStr: String): T = { /*your code here*/ }
      def marshall[T](t: T): String = { /*your code here*/ }
    }

    
    // on call site, define implicit marshaller
    implicit val customMarshaller = myMarshaller 

    put("/somePath", but = withPayload(SomeCaseClass("Hi There !!!")))