Skip to content

Instantly share code, notes, and snippets.

@rschreijer
rschreijer / MetricRegistryJsonProtocol.scala
Last active Sep 17, 2019
spray-json protocol for the Metric lib. Serializes a MetricRegistry and/or single Metric objects from Spray. See https://dropwizard.github.io/metrics, https://github.com/spray/spray-json
View MetricRegistryJsonProtocol.scala
package spray.json.examples
import java.util.concurrent.TimeUnit
import scala.collection.JavaConverters._
import scala.util.{Try, Success, Failure}
import com.codahale.metrics._
import spray.json._