diff options
author | vlad <vlad@drivergrp.com> | 2016-07-25 11:31:57 -0400 |
---|---|---|
committer | vlad <vlad@drivergrp.com> | 2016-07-25 11:31:57 -0400 |
commit | f73b214065011a9567fd20a0e467ff3b09a0bff7 (patch) | |
tree | c862a7c49fe14096d14896aae968079602055b0c /src/main/scala | |
parent | ceef79908fcfaa87d1d7cd46c86a9f374ae82463 (diff) | |
download | driver-core-f73b214065011a9567fd20a0e467ff3b09a0bff7.tar.gz driver-core-f73b214065011a9567fd20a0e467ff3b09a0bff7.tar.bz2 driver-core-f73b214065011a9567fd20a0e467ff3b09a0bff7.zip |
Removed redundant type parameter at Time JSON format
Diffstat (limited to 'src/main/scala')
-rw-r--r-- | src/main/scala/com/drivergrp/core/rest.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/scala/com/drivergrp/core/rest.scala b/src/main/scala/com/drivergrp/core/rest.scala index b7edc5b..914e1ec 100644 --- a/src/main/scala/com/drivergrp/core/rest.scala +++ b/src/main/scala/com/drivergrp/core/rest.scala @@ -97,12 +97,12 @@ object rest { } } - def TimeInPath[T]: PathMatcher1[Time] = + def TimeInPath: PathMatcher1[Time] = PathMatcher("""[+-]?\d*""".r) flatMap { string ⇒ try Some(Time(string.toLong)) catch { case _: IllegalArgumentException ⇒ None } } - implicit def timeFormat[T] = new RootJsonFormat[Time] { + implicit val timeFormat = new RootJsonFormat[Time] { def write(time: Time) = JsObject("timestamp" -> JsNumber(time.millis)) def read(value: JsValue): Time = value match { |