Revert "[ONOS-7957] Json output should not have quotes for int64/uint64 datatype"
This reverts commit ec36cec5a38e8e8015275bcced3481ae6feee87a.
Change-Id: Ibbba944b3b5b77b3a4b7e1fa6e3d8ffef29a3650
diff --git a/serializers/json/src/main/java/org/onosproject/yang/serializers/json/DefaultJsonBuilder.java b/serializers/json/src/main/java/org/onosproject/yang/serializers/json/DefaultJsonBuilder.java
index 19cd245..61234b6 100644
--- a/serializers/json/src/main/java/org/onosproject/yang/serializers/json/DefaultJsonBuilder.java
+++ b/serializers/json/src/main/java/org/onosproject/yang/serializers/json/DefaultJsonBuilder.java
@@ -106,8 +106,6 @@
case INT32:
case UINT16:
case UINT32:
- case INT64:
- case UINT64:
case BOOLEAN:
treeString.append(v);
break;
diff --git a/serializers/json/src/test/java/org/onosproject/yang/serializers/json/JsonSerializerTest.java b/serializers/json/src/test/java/org/onosproject/yang/serializers/json/JsonSerializerTest.java
index 88c4cd4..5bf8ce6 100644
--- a/serializers/json/src/test/java/org/onosproject/yang/serializers/json/JsonSerializerTest.java
+++ b/serializers/json/src/test/java/org/onosproject/yang/serializers/json/JsonSerializerTest.java
@@ -76,11 +76,11 @@
private static String outputIdTestJson1 = "{\"jsonlist:c2\":{\"leaf1\":1,\"" +
"leaf10\":\"-922337203685477580.8\",\"leaf2\":2,\"leaf3\":3," +
- "\"leaf4\":4,\"leaf5\":5,\"leaf6\":6,\"leaf7\":7," +
- "\"leaf8\":8,\"leaf9\":true,\"leaflist1\":[\"a\",\"b\",\"c\"]," +
+ "\"leaf4\":4,\"leaf5\":5,\"leaf6\":6,\"leaf7\":\"7\"," +
+ "\"leaf8\":\"8\",\"leaf9\":true,\"leaflist1\":[\"a\",\"b\",\"c\"]," +
"\"ll1\":[1,10],\"ll10\":[\"-922337203685477580.8\",\"-922337203685477480.8\"]," +
"\"ll2\":[2,20],\"ll3\":[3,30],\"ll4\":[4,40],\"ll5\":[5,50],\"ll6\":[6,60]," +
- "\"ll7\":[7,70],\"ll8\":[8,80],\"ll9\":[true,false]}}";
+ "\"ll7\":[\"7\",\"70\"],\"ll8\":[\"8\",\"80\"],\"ll9\":[true,false]}}";
@Rule
public ExpectedException thrown = ExpectedException.none();
diff --git a/serializers/json/src/test/resources/testinput1.json b/serializers/json/src/test/resources/testinput1.json
index 31452e9..583a57b 100644
--- a/serializers/json/src/test/resources/testinput1.json
+++ b/serializers/json/src/test/resources/testinput1.json
@@ -11,8 +11,8 @@
"leaf4": 4,
"leaf5": 5,
"leaf6": 6,
- "leaf7": 7,
- "leaf8": 8,
+ "leaf7": "7",
+ "leaf8": "8",
"leaf9": true,
"leaf10": "-922337203685477580.8",
"ll1": [
@@ -48,8 +48,8 @@
80
],
"ll9": [
- true,
- false
+ "true",
+ "false"
],
"ll10": [
"-922337203685477580.8",