Bug 2062 - StreamWriter APIs loses information about leaf-set ordering
[yangtools.git] / yang / yang-data-codec-gson / src / main / java / org / opendaylight / yangtools / yang / data / codec / gson / JSONNormalizedNodeStreamWriter.java
index 0a8f9877e992d0f700cd62c68bd102a063595a94..aefb981f66affb0e79580e7e0d08d068c9dbe767 100644 (file)
@@ -111,6 +111,12 @@ public final class JSONNormalizedNodeStreamWriter implements NormalizedNodeStrea
         writeValue(value, codec);
     }
 
+    @Override
+    public void startOrderedLeafSet(final NodeIdentifier name, final int childSizeHint) throws IOException {
+        tracker.startLeafSet(name);
+        context = new JSONStreamWriterListContext(context, name);
+    }
+
     /*
      * Warning suppressed due to static final constant which triggers a warning
      * for the call to schema.isPresenceContainer().