File tree 1 file changed +14
-12
lines changed
src/main/scala/io/waylay/kairosdb/driver/models/json
1 file changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -330,18 +330,20 @@ object Formats {
330
330
331
331
implicit val queryTagFormat = Json .format[QueryTag ]
332
332
333
- implicit val queryPluginWrites : Writes [QueryPlugin ] = (plugin : QueryPlugin ) => {
334
- JsObject (Seq (" name" -> JsString (plugin.name)) ++ plugin.properties.map(
335
- prop => {
336
- val propValue : JsValue = prop._2 match {
337
- case s : String => Json .toJson(s)
338
- case l : Long => Json .toJson(l)
339
- case i : Integer => Json .toJson(i.longValue())
340
- case d : Double => Json .toJson(d)
341
- case stringSeq : Seq [String ] => Json .toJson(stringSeq)
342
- }
343
- prop._1 -> propValue
344
- }))
333
+ implicit val queryPluginWrites : Writes [QueryPlugin ] = new Writes [QueryPlugin ] {
334
+ override def writes (plugin : QueryPlugin ): JsValue = {
335
+ JsObject (Seq (" name" -> JsString (plugin.name)) ++ plugin.properties.map(
336
+ prop => {
337
+ val propValue : JsValue = prop._2 match {
338
+ case s : String => Json .toJson(s)
339
+ case l : Long => Json .toJson(l)
340
+ case i : Integer => Json .toJson(i.longValue())
341
+ case d : Double => Json .toJson(d)
342
+ case stringSeq : Seq [String ] => Json .toJson(stringSeq)
343
+ }
344
+ prop._1 -> propValue
345
+ }))
346
+ }
345
347
}
346
348
347
349
implicit val queryWrites : Writes [Query ] = new Writes [Query ] {
You can’t perform that action at this time.
0 commit comments