@Override public void setSchema(FormatSchema schema) { delegate.setSchema(schema); } @Override public boolean canUseSchema(FormatSchema schema) { return delegate.canUseSchema(schema); }
@Override public void setSchema(FormatSchema schema) { delegate.setSchema(schema); } @Override public boolean canUseSchema(FormatSchema schema) { return delegate.canUseSchema(schema); }
/** * Alternative to {@link #_initForReading} used in cases where reading * of multiple values means that we may or may not want to advance the stream, * but need to do other initialization. *<p> * Base implementation only sets configured {@link FormatSchema}, if any, on parser. * * @since 2.8 */ protected void _initForMultiRead(DeserializationContext ctxt, JsonParser p) throws IOException { if (_schema != null) { p.setSchema(_schema); } _config.initialize(p); }
protected JsonToken _initForReading(DeserializationContext ctxt, JsonParser p) throws IOException { if (_schema != null) { p.setSchema(_schema); } _config.initialize(p); // since 2.5 /* First: must point to a token; if not pointing to one, advance. * This occurs before first read from JsonParser, as well as * after clearing of current token. */ JsonToken t = p.getCurrentToken(); if (t == null) { // and then we must get something... t = p.nextToken(); if (t == null) { // Throw mapping exception, since it's failure to map, not an actual parsing problem ctxt.reportInputMismatch(_valueType, "No content to map due to end-of-input"); } } return t; }
p.setSchema(_schema);
@Override public void setSchema(FormatSchema schema) { delegate.setSchema(schema); }
@Override public void setSchema(FormatSchema schema) { delegate.setSchema(schema); }
@Override public void setSchema(FormatSchema schema) { delegate.setSchema(schema); } @Override public boolean canUseSchema(FormatSchema schema) { return delegate.canUseSchema(schema); }
@Override public void setSchema(FormatSchema schema) { delegate.setSchema(schema); } @Override public boolean canUseSchema(FormatSchema schema) { return delegate.canUseSchema(schema); }
private JacksonResumableParser createResumableParser(final JsonParser jp, SurfingContext context) { if (this.formatSchema != null) { jp.setSchema(formatSchema); } return new JacksonResumableParser(jp, context); }
/** * Alternative to {@link #_initForReading(JsonParser)} used in cases where reading * of multiple values means that we may or may not want to advance the stream, * but need to do other initialization. *<p> * Base implementation only sets configured {@link FormatSchema}, if any, on parser. * * @since 2.5 */ protected void _initForMultiRead(JsonParser p) throws IOException { if (_schema != null) { p.setSchema(_schema); } _config.initialize(p); // since 2.5 }
/** * Alternative to {@link #_initForReading(JsonParser)} used in cases where reading * of multiple values means that we may or may not want to advance the stream, * but need to do other initialization. *<p> * Base implementation only sets configured {@link FormatSchema}, if any, on parser. * * @since 2.5 */ protected void _initForMultiRead(JsonParser p) throws IOException { if (_schema != null) { p.setSchema(_schema); } _config.initialize(p); // since 2.5 }
protected JsonNode _bindAndCloseAsTree(JsonParser jp) throws IOException, JsonParseException, JsonMappingException { if (_schema != null) { jp.setSchema(_schema); } try { return _bindAsTree(jp); } finally { try { jp.close(); } catch (IOException ioe) { } } }
protected JsonNode _bindAndCloseAsTree(JsonParser jp) throws IOException, JsonParseException, JsonMappingException { if (_schema != null) { jp.setSchema(_schema); } try { return _bindAsTree(jp); } finally { try { jp.close(); } catch (IOException ioe) { } } }
/** * Method for reading sequence of Objects from parser stream. */ public <T> MappingIterator<T> readValues(File src) throws IOException, JsonProcessingException { JsonParser jp = _jsonFactory.createJsonParser(src); if (_schema != null) { jp.setSchema(_schema); } DeserializationContext ctxt = createDeserializationContext(jp, _config); return new MappingIterator<T>(_valueType, jp, ctxt, _findRootDeserializer(ctxt, _valueType), true, _valueToUpdate); }
/** * Method for reading sequence of Objects from parser stream. */ public <T> MappingIterator<T> readValues(URL src) throws IOException, JsonProcessingException { JsonParser jp = _jsonFactory.createJsonParser(src); if (_schema != null) { jp.setSchema(_schema); } DeserializationContext ctxt = createDeserializationContext(jp, _config); return new MappingIterator<T>(_valueType, jp, ctxt, _findRootDeserializer(ctxt, _valueType), true, _valueToUpdate); }
/** * Method for reading sequence of Objects from parser stream. */ public <T> MappingIterator<T> readValues(Reader src) throws IOException, JsonProcessingException { JsonParser jp = _jsonFactory.createJsonParser(src); if (_schema != null) { jp.setSchema(_schema); } DeserializationContext ctxt = createDeserializationContext(jp, _config); return new MappingIterator<T>(_valueType, jp, ctxt, _findRootDeserializer(ctxt, _valueType), true, _valueToUpdate); }
/** * Method for reading sequence of Objects from parser stream. */ public <T> MappingIterator<T> readValues(String json) throws IOException, JsonProcessingException { JsonParser jp = _jsonFactory.createJsonParser(json); if (_schema != null) { jp.setSchema(_schema); } DeserializationContext ctxt = createDeserializationContext(jp, _config); return new MappingIterator<T>(_valueType, jp, ctxt, _findRootDeserializer(ctxt, _valueType), true, _valueToUpdate); }
/** * Method for reading sequence of Objects from parser stream. */ public <T> MappingIterator<T> readValues(byte[] src, int offset, int length) throws IOException, JsonProcessingException { JsonParser jp = _jsonFactory.createJsonParser(src, offset, length); if (_schema != null) { jp.setSchema(_schema); } DeserializationContext ctxt = createDeserializationContext(jp, _config); return new MappingIterator<T>(_valueType, jp, ctxt, _findRootDeserializer(ctxt, _valueType), true, _valueToUpdate); }
/** * Method for reading sequence of Objects from parser stream. */ public <T> MappingIterator<T> readValues(InputStream src) throws IOException, JsonProcessingException { JsonParser jp = _jsonFactory.createJsonParser(src); if (_schema != null) { jp.setSchema(_schema); } DeserializationContext ctxt = createDeserializationContext(jp, _config); return new MappingIterator<T>(_valueType, jp, ctxt, _findRootDeserializer(ctxt, _valueType), true, _valueToUpdate); }