diff --git a/src/main/java/net/frozenorb/apiv3/route/GETMetrics.java b/src/main/java/net/frozenorb/apiv3/route/GETMetrics.java index 8bbbacf..9ee0821 100644 --- a/src/main/java/net/frozenorb/apiv3/route/GETMetrics.java +++ b/src/main/java/net/frozenorb/apiv3/route/GETMetrics.java @@ -5,6 +5,7 @@ import io.vertx.core.json.JsonObject; import io.vertx.ext.dropwizard.MetricsService; import io.vertx.ext.web.RoutingContext; import net.frozenorb.apiv3.APIv3; +import org.bson.Document; public final class GETMetrics implements Handler { @@ -12,7 +13,8 @@ public final class GETMetrics implements Handler { MetricsService metricsService = MetricsService.create(APIv3.getVertxInstance()); JsonObject metrics = metricsService.getMetricsSnapshot(APIv3.getVertxInstance()); - APIv3.respondJson(ctx, 200, metrics); + // We encode and then parse because JsonObject and Gson don't play nicely with each other + APIv3.respondJson(ctx, 200, Document.parse(metrics.encode())); } } \ No newline at end of file