NormalizedNode<?, ?> partialResult = resultHolder.getResult();
final NormalizedNode<?, ?> result;
- // unwrap result from augmentation and choice nodes on PUT
+ // FIXME: Also II should be updated unwrap result from augmentation and choice nodes on PUT
if (!isPost()) {
while (partialResult instanceof AugmentationNode || partialResult instanceof ChoiceNode) {
final Object childNode = ((DataContainerNode) partialResult).getValue().iterator().next();
}
}
- if (partialResult instanceof MapNode) {
+ if (partialResult instanceof MapNode && !isPost()) {
result = Iterables.getOnlyElement(((MapNode) partialResult).getValue());
} else {
result = partialResult;
}
return new NormalizedNodeContext(path,result);
+ } catch (final RestconfDocumentedException e) {
+ throw e;
} catch (final Exception e) {
LOG.debug("Error parsing json input", e);