From 7d4f04c6c280454b70864eb055e102ff1ecc10cb Mon Sep 17 00:00:00 2001 From: Mansur Ashraf Date: Tue, 4 Feb 2014 19:30:36 -0600 Subject: [PATCH 1/2] added json4s to project aggregate --- project/Build.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/project/Build.scala b/project/Build.scala index 97d726674..828ac81ca 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -129,7 +129,8 @@ object BijectionBuild extends Build { bijectionNetty, bijectionAvro, bijectionHbase, - bijectionJodaTime + bijectionJodaTime, + bijectionJson4s ) def module(name: String) = { From da70498d7f01800c09041d148c4c2079bae6aa14 Mon Sep 17 00:00:00 2001 From: Mansur Ashraf Date: Tue, 4 Feb 2014 20:07:39 -0600 Subject: [PATCH 2/2] fixed the build on scala 2.10 --- .../bijection/json4s/Json4sInjectionLaws.scala | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/bijection-json4s/src/test/scala/com/twitter/bijection/json4s/Json4sInjectionLaws.scala b/bijection-json4s/src/test/scala/com/twitter/bijection/json4s/Json4sInjectionLaws.scala index 3ebb20769..8e1c5dbf4 100644 --- a/bijection-json4s/src/test/scala/com/twitter/bijection/json4s/Json4sInjectionLaws.scala +++ b/bijection-json4s/src/test/scala/com/twitter/bijection/json4s/Json4sInjectionLaws.scala @@ -16,7 +16,7 @@ package com.twitter.bijection.json4s import org.scalacheck.Properties import com.twitter.bijection.{Injection, BaseProperties} -import Json4sInjections._ + import org.json4s.JsonAST._ import org.json4s.JsonAST.JString @@ -51,7 +51,16 @@ with BaseProperties { def roundTripJValueToString(implicit inj: Injection[JValue, String]) = isLooseInjection[JValue, String] - property("round trip Case Class to Json") = roundTripCaseClassToJson - property("round trip Case Class to JValue") = roundTripCaseClassToJValue - property("round trip JValue to String") = roundTripJValueToString + property("round trip Case Class to Json") = { + import Json4sInjections.caseClass2Json + roundTripCaseClassToJson + } + property("round trip Case Class to JValue") = { + import Json4sInjections.caseClass2JValue + roundTripCaseClassToJValue + } + property("round trip JValue to String") = { + import Json4sInjections.jvalue2Json + roundTripJValueToString + } }