- public CompositeNode readFrom(Class<CompositeNode> type, Type genericType, Annotation[] annotations,
- MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream)
- throws IOException, WebApplicationException {
- // TODO Auto-generated method stub
- return null;
+ public Node<?> readFrom(final Class<Node<?>> type, final Type genericType,
+ final Annotation[] annotations, final MediaType mediaType,
+ final MultivaluedMap<String, String> httpHeaders, final InputStream entityStream) throws IOException,
+ WebApplicationException {
+ try {
+ return JsonToCompositeNodeReader.read(entityStream);
+ } catch (final Exception e) {
+ LOG.debug("Error parsing json input", e);
+
+ throw new RestconfDocumentedException("Error parsing input: " + e.getMessage(), ErrorType.PROTOCOL,
+ ErrorTag.MALFORMED_MESSAGE);
+ }