final MultivaluedMap<String, String> httpHeaders, final InputStream entityStream) throws IOException,
WebApplicationException {
try {
- return readFrom(getInstanceIdentifierContext(), entityStream, isPost());
+ if (getUriInfo().getAbsolutePath().getPath().contains(RestconfConstants.DRAFT_PATTERN)) {
+ final org.opendaylight.restconf.jersey.providers.JsonNormalizedNodeBodyReader jsonReaderNewRest =
+ new org.opendaylight.restconf.jersey.providers.JsonNormalizedNodeBodyReader();
+ jsonReaderNewRest.injectParams(getUriInfo(), getRequest());
+ return jsonReaderNewRest.readFrom(type, genericType, annotations, mediaType, httpHeaders, entityStream);
+ } else {
+ return readFrom(getInstanceIdentifierContext(), entityStream, isPost());
+ }
} catch (final Exception e) {
propagateExceptionAs(e);
return null; // no-op