Permalink
Browse files

large reorganization changes to json package

  • Loading branch information...
jdegoes committed Oct 18, 2012
1 parent 4640bd1 commit b22e6c5f79f79399d7c9534e113810e54051c49c
Showing with 244 additions and 2,318 deletions.
  1. +1 −1 core/src/main/scala/blueeyes/core/data/Bijection.scala
  2. +3 −3 core/src/main/scala/blueeyes/core/data/BijectionsByteArray.scala
  3. +3 −3 core/src/main/scala/blueeyes/core/data/BijectionsChunkJson.scala
  4. +1 −1 core/src/main/scala/blueeyes/core/service/HttpRequestHandlerCombinators.scala
  5. +1 −1 core/src/main/scala/blueeyes/core/service/HttpRequestLoggerJsonFormatter.scala
  6. +2 −2 core/src/main/scala/blueeyes/core/service/HttpServices.scala
  7. +1 −1 core/src/main/scala/blueeyes/core/service/ServerHealthMonitorService.scala
  8. +1 −1 core/src/main/scala/blueeyes/core/service/ServiceDescriptorFactoryCombinators.scala
  9. +1 −1 core/src/main/scala/blueeyes/core/storeable/Storeable.scala
  10. +1 −1 core/src/main/scala/blueeyes/core/storeable/ValueImplicits.scala
  11. +1 −1 core/src/main/scala/blueeyes/health/CompositeHealthMonitor.scala
  12. +1 −1 core/src/main/scala/blueeyes/health/ExportedStatistic.scala
  13. +2 −2 core/src/main/scala/blueeyes/health/HealthMonitor.scala
  14. +1 −1 core/src/main/scala/blueeyes/health/IntervalHealthMonitor.scala
  15. +1 −1 core/src/main/scala/blueeyes/health/metrics/Counter.scala
  16. +1 −1 core/src/main/scala/blueeyes/health/metrics/ErrorStat.scala
  17. +1 −1 core/src/main/scala/blueeyes/health/metrics/Sample.scala
  18. +1 −1 core/src/main/scala/blueeyes/health/metrics/Statistic.scala
  19. +1 −1 core/src/main/scala/blueeyes/health/metrics/TimedNumbersSample.scala
  20. +1 −1 core/src/main/scala/blueeyes/health/metrics/TimedStats.scala
  21. +1 −1 core/src/main/scala/blueeyes/health/metrics/Timer.scala
  22. +1 −1 core/src/test/scala/blueeyes/core/data/BijectionsChunkByteArraySpec.scala
  23. +1 −1 core/src/test/scala/blueeyes/core/data/BijectionsChunkJsonSpec.scala
  24. +1 −1 core/src/test/scala/blueeyes/core/http/combinators/HttpRequestCombinatorsSpec.scala
  25. +3 −3 core/src/test/scala/blueeyes/core/service/HttpRequestHandlerCombinatorsSpec.scala
  26. +1 −1 core/src/test/scala/blueeyes/core/service/HttpRequestLoggerJsonFormatterSpec.scala
  27. +5 −5 core/src/test/scala/blueeyes/core/service/HttpServiceDescriptorFactoryCombinatorsSpec.scala
  28. +8 −8 core/src/test/scala/blueeyes/core/service/ServerHealthMonitorServiceSpec.scala
  29. +1 −1 core/src/test/scala/blueeyes/core/service/engines/HttpClientXLightWebSpec.scala
  30. +1 −1 core/src/test/scala/blueeyes/health/ExportedStatisticSpec.scala
  31. +3 −3 core/src/test/scala/blueeyes/health/IntervalHealthMonitorSpec.scala
  32. +1 −1 core/src/test/scala/blueeyes/health/metrics/CounterSpec.scala
  33. +1 −1 core/src/test/scala/blueeyes/health/metrics/ErrorStatSpec.scala
  34. +1 −1 core/src/test/scala/blueeyes/health/metrics/SampleSpec.scala
  35. +1 −1 core/src/test/scala/blueeyes/health/metrics/TimedAverageStatSpec.scala
  36. +1 −1 core/src/test/scala/blueeyes/health/metrics/TimedCountStatSpec.scala
  37. +2 −2 core/src/test/scala/blueeyes/health/metrics/TimedEternityAverageStatSpec.scala
  38. +1 −1 core/src/test/scala/blueeyes/health/metrics/TimedEternityCountStatSpec.scala
  39. +2 −2 core/src/test/scala/blueeyes/health/metrics/TimedSampleSpec.scala
  40. +1 −1 core/src/test/scala/blueeyes/health/metrics/TimedTimerStatSpec.scala
  41. +1 −1 demo/src/main/scala/blueeyes/benchmark/Benchmark.scala
  42. +2 −2 demo/src/main/scala/blueeyes/demo/BlueEyesClientDemo.scala
  43. +1 −1 demo/src/main/scala/blueeyes/demo/BlueEyesDemo.scala
  44. +3 −3 demo/src/main/scala/blueeyes/demo/Data.scala
  45. +2 −2 demo/src/main/scala/blueeyes/demo/xschema/XSchemaBootstrap.scala
  46. +1 −1 demo/src/test/scala/blueeyes/demo/BlueEyesDemoServiceSpec.scala
  47. +2 −2 demo/src/test/scala/blueeyes/demo/DataTest.scala
  48. +1 −1 json/src/main/scala/blueeyes/json/CharBuilder.scala
  49. +5 −7 json/src/main/scala/blueeyes/json/Context.scala
  50. +10 −27 json/src/main/scala/blueeyes/json/Diff.scala
  51. +0 −1 json/src/main/scala/blueeyes/json/JPath.scala
  52. +0 −1,001 json/src/main/scala/blueeyes/json/JsonAST.scala
  53. +0 −919 json/src/main/scala/blueeyes/json/JsonParser.scala
  54. +3 −15 json/src/main/scala/blueeyes/json/Merge.scala
  55. +0 −102 json/src/main/scala/blueeyes/json/Validation.scala
  56. +10 −4 json/src/main/scala/blueeyes/json/package.scala
  57. +1 −1 json/src/main/scala/blueeyes/json/serialization/DefaultDecomposers.scala
  58. +2 −2 json/src/main/scala/blueeyes/json/serialization/DefaultExtractors.scala
  59. +1 −1 json/src/main/scala/blueeyes/json/serialization/DefaultOrderings.scala
  60. +0 −1 json/src/main/scala/blueeyes/json/serialization/JodaSerialization.scala
  61. +1 −1 json/src/main/scala/blueeyes/json/serialization/Serialization.scala
  62. +1 −3 json/src/test/scala/blueeyes/json/ArbitraryJValue.scala
  63. +4 −6 json/src/test/scala/blueeyes/json/DiffExamples.scala
  64. +4 −7 json/src/test/scala/blueeyes/json/Examples.scala
  65. +1 −3 json/src/test/scala/blueeyes/json/JObjectSpec.scala
  66. +0 −2 json/src/test/scala/blueeyes/json/JPathSpec.scala
  67. +16 −19 json/src/test/scala/blueeyes/json/JsonASTTest.scala
  68. +5 −8 json/src/test/scala/blueeyes/json/JsonParserSpec.scala
  69. +2 −4 json/src/test/scala/blueeyes/json/MergeExamples.scala
  70. +1 −2 json/src/test/scala/blueeyes/json/PrintingTest.scala
  71. +1 −1 json/src/test/scala/blueeyes/json/PullParserExample.scala
  72. +3 −8 json/src/test/scala/blueeyes/json/QueryExamples.scala
  73. +1 −1 json/src/test/scala/blueeyes/json/serialization/DefaultSerializationExamples.scala
  74. +1 −1 mongo/src/main/scala/blueeyes/persistence/mongo/BijectionsMongoValueJson.scala
  75. +1 −1 mongo/src/main/scala/blueeyes/persistence/mongo/Mongo.scala
  76. +3 −3 mongo/src/main/scala/blueeyes/persistence/mongo/MongoFilter.scala
  77. +1 −1 mongo/src/main/scala/blueeyes/persistence/mongo/MongoImplicits.scala
  78. +1 −1 mongo/src/main/scala/blueeyes/persistence/mongo/MongoPatches.scala
  79. +1 −1 mongo/src/main/scala/blueeyes/persistence/mongo/MongoQuery.scala
  80. +1 −1 mongo/src/main/scala/blueeyes/persistence/mongo/MongoStage.scala
  81. +1 −1 mongo/src/main/scala/blueeyes/persistence/mongo/MongoUpdate.scala
  82. +1 −1 mongo/src/main/scala/blueeyes/persistence/mongo/QueryBehaviours.scala
  83. +1 −1 mongo/src/main/scala/blueeyes/persistence/mongo/RealMongo.scala
  84. +3 −3 mongo/src/main/scala/blueeyes/persistence/mongo/json/BijectionsMongoJson.scala
  85. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/AllFieldFilterEvaluatorSpec.scala
  86. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/EnsureIndexQueryBehaviourSpec.scala
  87. +3 −3 mongo/src/test/scala/blueeyes/persistence/mongo/EqFieldFilterEvaluatorSpec.scala
  88. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/ExistFieldFilterEvaluatorSpec.scala
  89. +3 −3 mongo/src/test/scala/blueeyes/persistence/mongo/ExplainQueryBehaviourSpec.scala
  90. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/GtFieldFilterEvaluatorSpec.scala
  91. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/GteFieldFilterEvaluatorSpec.scala
  92. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/InFieldFilterEvaluatorSpec.scala
  93. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/InsertQueryBehaviourSpec.scala
  94. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/LtFieldFilterEvaluatorSpec.scala
  95. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/LteFieldFilterEvaluatorSpec.scala
  96. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/ModFieldFilterEvaluatorSpec.scala
  97. +2 −2 mongo/src/test/scala/blueeyes/persistence/mongo/MongoAndFilterSpec.scala
  98. +3 −3 mongo/src/test/scala/blueeyes/persistence/mongo/MongoElementsMatchFilterSpec.scala
  99. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/MongoFieldFilterSpec.scala
  100. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/MongoFilterBuilderSpec.scala
  101. +7 −7 mongo/src/test/scala/blueeyes/persistence/mongo/MongoFilterEvaluatorSpec.scala
  102. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/MongoGroupQuerySpec.scala
  103. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/MongoOrFilterSpec.scala
  104. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/MongoPatchesSpec.scala
  105. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/MongoQueryBehaviourSpec.scala
  106. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/MongoQueryBuilderSpec.scala
  107. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/MongoSelectOneQuerySpec.scala
  108. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/MongoSelectQuerySpec.scala
  109. +5 −5 mongo/src/test/scala/blueeyes/persistence/mongo/MongoSpec.scala
  110. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/MongoUpdateBuilderSpec.scala
  111. +3 −3 mongo/src/test/scala/blueeyes/persistence/mongo/MongoUpdateFieldSpec.scala
  112. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/MongoUpdateFieldsSpec.scala
  113. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/MongoUpdateNothingSpec.scala
  114. +3 −3 mongo/src/test/scala/blueeyes/persistence/mongo/MongoUpdateObjectSpec.scala
  115. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/MongoUpdateQuerySpec.scala
  116. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/MongoUpdateSpec.scala
  117. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/MongoValueBijectionSpec.scala
  118. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/MongoValuesSpec.scala
  119. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/MultiSelectQueryBehaviourSpec.scala
  120. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/NearFilterEvaluatorSpec.scala
  121. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/NearSphereFilterEvaluatorSpec.scala
  122. +5 −5 mongo/src/test/scala/blueeyes/persistence/mongo/NeqFieldFilterEvaluatorSpec.scala
  123. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/NinFieldFilterEvaluatorSpec.scala
  124. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/RealMongoBenchmarkSpec.scala
  125. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/RegexFilterEvaluatorSpec.scala
  126. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/RemoveQueryBehaviourSpec.scala
  127. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/SelectOneQueryBehaviourSpec.scala
  128. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/SizeFieldFilterEvaluatorSpec.scala
  129. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/TypeFieldFilterEvaluatorSpec.scala
  130. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/UpdateQueryBehaviourSpec.scala
  131. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/WhereFilterEvaluatorSpec.scala
  132. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/WhereFilterScriptBuilderSpec.scala
  133. +1 −1 mongo/src/test/scala/blueeyes/persistence/mongo/WithinFilterEvaluatorSpec.scala
  134. +4 −4 mongo/src/test/scala/blueeyes/persistence/mongo/json/BijectionsMongoJsonSpec.scala
  135. +3 −3 mongo/src/test/scala/js/RhinoScriptSpec.scala
@@ -1,6 +1,6 @@
package blueeyes.core.data
-import blueeyes.json.JsonAST.JValue
+import blueeyes.json.JValue
import scala.xml.NodeSeq
import scalaz.{ Validation, Failure, ValidationNEL }
@@ -1,7 +1,7 @@
package blueeyes.core.data
-import blueeyes.json.JsonAST._
-import blueeyes.json.JsonParser
+import blueeyes.json._
+import blueeyes.json.JParser
import scala.xml.NodeSeq
import scala.xml.XML
@@ -13,7 +13,7 @@ trait BijectionsByteArray {
implicit val JValueToByteArray = new Bijection[JValue, Array[Byte]]{
def unapply(arr: Array[Byte]) = {
val bb = ByteBuffer.wrap(arr)
- val r = JsonParser.parseFromByteBuffer(bb)
+ val r = JParser.parseFromByteBuffer(bb)
r.valueOr(e => throw e)
}
def apply(t: JValue) = {
@@ -1,7 +1,7 @@
package blueeyes.core.data
-import blueeyes.json.JsonAST._
-import blueeyes.json.JsonParser
+import blueeyes.json._
+import blueeyes.json.JParser
import akka.dispatch.Future
import akka.dispatch.Await
import akka.util.Timeout
@@ -13,7 +13,7 @@ trait BijectionsChunkJson{
implicit val JValueToChunk = new Bijection[JValue, ByteChunk] {
def unapply(s: ByteChunk) = {
val bb = ByteBuffer.wrap(s.data)
- val r = JsonParser.parseFromByteBuffer(bb)
+ val r = JParser.parseFromByteBuffer(bb)
r.valueOr(e => throw e)
}
@@ -7,7 +7,7 @@ import http.HttpStatusCodes._
import data.{Chunk, ByteChunk, CompressedByteChunk, Bijection}
import akka.dispatch.Future
-import blueeyes.json.JsonAST._
+import blueeyes.json._
import blueeyes.util.metrics.DataSize
import scala.xml.NodeSeq
@@ -1,6 +1,6 @@
package blueeyes.core.service
-import blueeyes.json.JsonAST.{JString, JField, JObject}
+import blueeyes.json.{JString, JField, JObject}
import blueeyes.parsers.W3ExtendedLogAST._
class HttpRequestLoggerJsonFormatter extends HttpRequestLoggerFormatter{
@@ -10,7 +10,7 @@ import blueeyes.core.http.HttpStatusCodes._
import blueeyes.core.data.{Chunk, ByteChunk, AggregatedByteChunk, ZLIBByteChunk, GZIPByteChunk, CompressedByteChunk, Bijection}
import blueeyes.util.metrics.DataSize
import blueeyes.util.printer._
-import blueeyes.json.JsonAST._
+import blueeyes.json._
import blueeyes.json.serialization.DefaultSerialization._
import java.net.URLDecoder._
@@ -328,7 +328,7 @@ extends DelegatingService[Chunk[T], Future[HttpResponse[Chunk[T]]], Future[JValu
object JsonpService extends AkkaDefaults {
def jsonpConvertRequest[T](r: HttpRequest[T])(implicit toJson: T => Future[JValue]): Validation[NotServed, HttpRequest[Future[JValue]]] = {
- import blueeyes.json.JsonParser.parse
+ import blueeyes.json.JParser.parse
import blueeyes.json.serialization.DefaultSerialization._
import Bijection._
@@ -1,6 +1,6 @@
package blueeyes.core.service
-import blueeyes.json.JsonAST._
+import blueeyes.json._
import akka.dispatch.Future
import akka.util.Timeout
import blueeyes.core.data._
@@ -2,7 +2,7 @@ package blueeyes.core.service
import com.weiglewilczek.slf4s.Logger
import blueeyes.bkka._
-import blueeyes.json.JsonAST._
+import blueeyes.json._
import blueeyes.json.{JPathField, JPath, JPathImplicits}
import blueeyes.parsers.W3ExtendedLogAST.FieldsDirective
import blueeyes.parsers.W3ExtendedLog
@@ -1,6 +1,6 @@
package blueeyes.core.storeable
-import blueeyes.json.JsonAST.JValue
+import blueeyes.json.JValue
import org.joda.time.DateTime
import scalaz.{Validation, Success, Failure}
@@ -1,6 +1,6 @@
package blueeyes.core.storeable
-import blueeyes.json.JsonAST.JValue
+import blueeyes.json.JValue
import org.joda.time.DateTime
trait ValueImplicits{
@@ -1,7 +1,7 @@
package blueeyes.health
import blueeyes.json.JPath
-import blueeyes.json.JsonAST._
+import blueeyes.json._
import metrics.IntervalConfig
import blueeyes.json.MergeMonoid
@@ -1,6 +1,6 @@
package blueeyes.health
-import blueeyes.json.JsonAST.JValue
+import blueeyes.json.JValue
import metrics.{SyncStatistic}
class ExportedStatistic[T](value: => T)(implicit converter: T => JValue) extends SyncStatistic[T, T]{
@@ -4,7 +4,7 @@ import akka.dispatch.Future
import akka.util.Timeout
import blueeyes.bkka.AkkaDefaults
import blueeyes.json.JPath
-import blueeyes.json.JsonAST.{JValue, JNothing}
+import blueeyes.json.{JValue, JUndefined}
trait HealthMonitor extends AkkaDefaults { self =>
def call(path: JPath)
@@ -79,7 +79,7 @@ object HealthMonitor {
def trap[T](path: JPath)(f: => T): T = f
override def withPrefix(prefix: JPath) = this
- def toJValue: Future[JValue] = Future(JNothing)
+ def toJValue: Future[JValue] = Future(JUndefined)
def shutdown(timeout: Timeout) = Future(())
}
}
@@ -7,7 +7,7 @@ import akka.util.Timeout
import blueeyes.bkka.AkkaDefaults
import blueeyes.json.{JPathIndex, JPathNode, JPathField, JPath}
-import blueeyes.json.JsonAST._
+import blueeyes.json._
import blueeyes.json.MergeMonoid
import java.util.concurrent.ConcurrentHashMap
@@ -1,7 +1,7 @@
package blueeyes.health.metrics
import java.util.concurrent.atomic.AtomicLong
-import blueeyes.json.JsonAST.JNum
+import blueeyes.json.JNum
/**
* A thread-safe counter which can go up or down from its initial value.
@@ -6,7 +6,7 @@ import java.util.concurrent.ConcurrentHashMap
import collection.mutable.ConcurrentMap
import blueeyes.health.ConcurrentMaps
import ConcurrentMaps._
-import blueeyes.json.JsonAST._
+import blueeyes.json._
class ErrorStat extends SyncStatistic[Throwable, Map[Class[_], Long]]{
private val _count = new AtomicLong(0)
@@ -7,7 +7,7 @@ import java.util.concurrent.ConcurrentHashMap
import blueeyes.health.ConcurrentMaps
import collection.mutable.ConcurrentMap
import ConcurrentMaps._
-import blueeyes.json.JsonAST._
+import blueeyes.json._
import histogram.ValueStrategy._
@@ -1,7 +1,7 @@
package blueeyes.health.metrics
import blueeyes.bkka.AkkaDefaults
-import blueeyes.json.JsonAST.JValue
+import blueeyes.json.JValue
import akka.dispatch.Future
import akka.dispatch.Promise
import akka.util.Timeout
@@ -7,7 +7,7 @@ import akka.util.Timeout
import java.util.concurrent.atomic.AtomicLong
import blueeyes.util.Clock
-import blueeyes.json.JsonAST._
+import blueeyes.json._
import histogram.ValueStrategy._
abstract class TimedNumbersSample(config: interval)(implicit clock: Clock) extends TimedSample[Double](config)
@@ -1,6 +1,6 @@
package blueeyes.health.metrics
-import blueeyes.json.JsonAST._
+import blueeyes.json._
import blueeyes.util.Clock
import akka.actor.Actor
import akka.dispatch.Future
@@ -7,7 +7,7 @@ import scala.math.sqrt
import blueeyes.util.metrics.Duration
import akka.dispatch.Future
import Duration._
-import blueeyes.json.JsonAST._
+import blueeyes.json._
import blueeyes.util.ClockSystem
/**
@@ -1,7 +1,7 @@
package blueeyes.core.data
import org.specs2.mutable.Specification
-import blueeyes.json.JsonAST._
+import blueeyes.json._
import blueeyes.concurrent.test.FutureMatchers
import akka.dispatch.Future
@@ -1,7 +1,7 @@
package blueeyes.core.data
import org.specs2.mutable.Specification
-import blueeyes.json.JsonAST._
+import blueeyes.json._
class BijectionsChunkJsonSpec extends Specification with BijectionsChunkJson{
"BijectionsChunkJson" should{
@@ -6,7 +6,7 @@ import blueeyes.core.http.{HttpRequest, HttpResponse, HttpException, HttpStatus}
import blueeyes.core.http.HttpStatusCodes._
import blueeyes.core.http.HttpMethods._
import blueeyes.core.http.test.HttpRequestMatchers
-import blueeyes.json.JsonAST._
+import blueeyes.json._
import akka.dispatch.Future
class HttpRequestCombinatorsSpec extends Specification with HttpRequestCombinators with HttpRequestMatchers with blueeyes.bkka.AkkaDefaults {
@@ -1,7 +1,7 @@
package blueeyes.core.service
-import blueeyes.json.JsonAST._
-import blueeyes.json.JsonParser
+import blueeyes.json._
+import blueeyes.json.JParser
import org.specs2.mutable.Specification
@@ -11,7 +11,7 @@ import blueeyes.core.http._
import blueeyes.core.http.MimeTypes._
import blueeyes.core.http.HttpHeaders._
import blueeyes.core.http.test.HttpRequestMatchers
-import blueeyes.json.JsonAST._
+import blueeyes.json._
import akka.dispatch.Future
import blueeyes.concurrent.test.FutureMatchers
import blueeyes.util.metrics.DataSize
@@ -1,7 +1,7 @@
package blueeyes.core.service
import org.specs2.mutable.Specification
-import blueeyes.json.JsonAST._
+import blueeyes.json._
import blueeyes.parsers.W3ExtendedLogAST._
class HttpRequestLoggerJsonFormatterSpec extends Specification{
@@ -10,7 +10,7 @@ import blueeyes.core.http.HttpStatusCodes._
import blueeyes.core.http.MimeTypes._
import blueeyes.core.http.{HttpRequest, HttpResponse, HttpStatus}
import blueeyes.core.data.{ByteChunk, BijectionsChunkJson, BijectionsChunkString}
-import blueeyes.json.JsonAST._
+import blueeyes.json._
import akka.dispatch.Future
import akka.util.Timeout
@@ -81,14 +81,14 @@ class HttpServiceDescriptorFactoryCombinatorsSpec extends BlueEyesServiceSpecifi
}
"support health monitor statistics" in {
- import blueeyes.json.JsonParser.parse
+ import blueeyes.json.JParser.parse
service.get[JValue]("/blueeyes/services/email/v1/health") must succeedWithContent { (content: JValue) =>
(content \ "requests" \ "GET" \ "count" \ "eternity" mustEqual(parse("[1]"))) and
- (content \ "requests" \ "GET" \ "timing" mustNotEqual(JNothing)) and
- (content \ "requests" \ "GET" \ "timing" \ "perSecond" \ "eternity" mustNotEqual(JNothing)) and
+ (content \ "requests" \ "GET" \ "timing" mustNotEqual(JUndefined)) and
+ (content \ "requests" \ "GET" \ "timing" \ "perSecond" \ "eternity" mustNotEqual(JUndefined)) and
(content \ "service" \ "name" mustEqual(JString("email"))) and
(content \ "service" \ "version" mustEqual(JString("1.2.3"))) and
- (content \ "uptimeSeconds" mustNotEqual(JNothing))
+ (content \ "uptimeSeconds" mustNotEqual(JUndefined))
}
}
@@ -1,7 +1,7 @@
package blueeyes.core.service
import test.BlueEyesServiceSpecification
-import blueeyes.json.JsonAST._
+import blueeyes.json._
import blueeyes.core.http.HttpStatus
import blueeyes.core.http.HttpStatusCodes._
import blueeyes.core.http.MimeTypes._
@@ -14,13 +14,13 @@ class ServerHealthMonitorServiceSpec extends BlueEyesServiceSpecification with S
"get server health" in {
service.get[JValue]("/blueeyes/server/health") must succeedWithContent {
(content: JValue) => {
- (content \ "runtime" must_!=(JNothing)) and
- (content \ "memory" must_!=(JNothing)) and
- (content \ "threads" must_!=(JNothing)) and
- (content \ "operatingSystem" must_!=(JNothing)) and
- (content \ "server" \ "hostName" must_!=(JNothing)) and
- (content \ "server" \ "port" must_!=(JNothing)) and
- (content \ "server" \ "sslPort" must_!=(JNothing))
+ (content \ "runtime" must_!=(JUndefined)) and
+ (content \ "memory" must_!=(JUndefined)) and
+ (content \ "threads" must_!=(JUndefined)) and
+ (content \ "operatingSystem" must_!=(JUndefined)) and
+ (content \ "server" \ "hostName" must_!=(JUndefined)) and
+ (content \ "server" \ "port" must_!=(JUndefined)) and
+ (content \ "server" \ "sslPort" must_!=(JUndefined))
}
}
}
@@ -17,7 +17,7 @@ import akka.dispatch.Await
import blueeyes.bkka.AkkaDefaults
import collection.mutable.ArrayBuilder.ofByte
-import blueeyes.json.JsonAST._
+import blueeyes.json._
import org.specs2.specification.{Step, Fragments}
import org.streum.configrity.Configuration
@@ -1,7 +1,7 @@
package blueeyes.health
import org.specs2.mutable.Specification
-import blueeyes.json.JsonAST.JNum
+import blueeyes.json.JNum
class ExportedStatisticSpec extends Specification {
"ExportedStatistic: gets lazy value" in{
@@ -6,8 +6,8 @@ import blueeyes.json.JPathImplicits._
import akka.dispatch.Future
import akka.dispatch.Promise
import blueeyes.concurrent.test.FutureMatchers
-import blueeyes.json.JsonAST._
-import blueeyes.json.{JsonParser, JPath}
+import blueeyes.json._
+import blueeyes.json.{JParser, JPath}
import java.util.concurrent.TimeUnit
class IntervalHealthMonitorSpec extends Specification with blueeyes.bkka.AkkaDefaults
@@ -70,7 +70,7 @@ with FutureMatchers {
monitor.error("foo")(new NullPointerException())
Thread.sleep(900)
- val monitorJson = JsonParser.parse("""{"foo":{"errorDistribution":{"java.lang.NullPointerException":{"1s x 3":[1,0,0]}},"count":{"1s x 3":[1,0,0]}}}""")
+ val monitorJson = JParser.parse("""{"foo":{"errorDistribution":{"java.lang.NullPointerException":{"1s x 3":[1,0,0]}},"count":{"1s x 3":[1,0,0]}}}""")
val jValue = monitor.toJValue
jValue.map(_.renderCanonical) must whenDelivered (be_==(monitorJson.renderCanonical))
}
@@ -1,6 +1,6 @@
package blueeyes.health.metrics
-import blueeyes.json.JsonAST.JNum
+import blueeyes.json.JNum
import org.specs2.mutable.Specification
class CounterSpec extends Specification {
@@ -1,7 +1,7 @@
package blueeyes.health.metrics
import org.specs2.mutable.Specification
-import blueeyes.json.JsonAST._
+import blueeyes.json._
class ErrorStatSpec extends Specification{
"counts errors" in{
@@ -1,7 +1,7 @@
package blueeyes.health.metrics
import org.specs2.mutable.Specification
-import blueeyes.json.JsonAST._
+import blueeyes.json._
class SampleSpec extends Specification{
private val sample = new Sample(10)
Oops, something went wrong.

0 comments on commit b22e6c5

Please sign in to comment.