+ /**
+ * Converts DataNode structure into a map including the root node identifier for a JSON response.
+ *
+ * @param dataNode data node object
+ * @return a map representing same data with the root node identifier
+ */
+ public static Map<String, Object> toDataMapWithIdentifier(final DataNode dataNode) {
+ return ImmutableMap.<String, Object>builder()
+ .put(getNodeIdentifier(dataNode.getXpath()), toDataMap(dataNode))
+ .build();
+ }
+