protected EndpointConfig initReader(ObjectMapper mapper) { // first common config if (_activeView != null) { _reader = mapper.readerWithView(_activeView); } else { _reader = mapper.reader(); } if (_rootName != null) { _reader = _reader.withRootName(_rootName); } // Then deser features if (_deserEnable != null) { _reader = _reader.withFeatures(_deserEnable); } if (_deserDisable != null) { _reader = _reader.withoutFeatures(_deserDisable); } /* Important: we are NOT to close the underlying stream after * mapping, so we need to instruct parser: */ _reader.getJsonFactory().disable(JsonParser.Feature.AUTO_CLOSE_SOURCE); return this; }