+ /**
+ * Check whether the data to be written consists only from mixins
+ */
+ private static boolean containsOnlyNonVisibleData(final YangInstanceIdentifier path, final NormalizedNode<?, ?> data) {
+ // There's only one such case:top level list (pathArguments == 1 && data is Mixin)
+ // any other mixin nodes are contained by a "regular" node thus visible when serialized
+ return path.getPathArguments().size() == 1 && data instanceof MixinNode;
+ }
+