Fix json formating for counters
Change-Id: Ibd506936507752a4911aa2cb0bac3ec916d1da71
diff --git a/cli/src/main/java/org/onosproject/cli/net/CountersListCommand.java b/cli/src/main/java/org/onosproject/cli/net/CountersListCommand.java
index 7a22965..3d1bbc4 100644
--- a/cli/src/main/java/org/onosproject/cli/net/CountersListCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/CountersListCommand.java
@@ -78,12 +78,12 @@
// Create a JSON node for partitioned database counter
ObjectNode jsonPartitionedDatabaseCounters = mapper.createObjectNode();
jsonPartitionedDatabaseCounters.put("partitionedDatabaseCounters",
- partitionedDbCounters.toString());
+ json(partitionedDbCounters));
jsonCounters.add(jsonPartitionedDatabaseCounters);
// Create a JSON node for in-memory database counter
ObjectNode jsonInMemoryDatabseCounters = mapper.createObjectNode();
jsonInMemoryDatabseCounters.put("inMemoryDatabaseCounters",
- inMemoryDbCounters.toString());
+ json(inMemoryDbCounters));
jsonCounters.add(jsonInMemoryDatabseCounters);
return jsonCounters;