com.fasterxml.jackson.core.type.ResolvedType Java Examples
The following examples show how to use
com.fasterxml.jackson.core.type.ResolvedType.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CapturingCodec.java From syndesis with Apache License 2.0 | 5 votes |
@Override @SuppressWarnings("TypeParameterUnusedInFormals") public <T> T readValue(final JsonParser p, final ResolvedType valueType) throws IOException { final T ret = delegate.readValue(p, valueType); captured = ret; return ret; }
Example #2
Source File: CapturingCodec.java From syndesis with Apache License 2.0 | 5 votes |
@Override public <T> Iterator<T> readValues(final JsonParser p, final ResolvedType valueType) throws IOException { final Iterator<T> ret = delegate.readValue(p, valueType); captured = ret; return ret; }
Example #3
Source File: JSON.java From jackson-jr with Apache License 2.0 | 4 votes |
@SuppressWarnings("unchecked") @Override public <T> T readValue(JsonParser p, ResolvedType type) throws IOException { return (T) readValue(p, type.getRawClass()); }
Example #4
Source File: ObjectMapper.java From lams with GNU General Public License v2.0 | 3 votes |
/** * Method to deserialize JSON content into a Java type, reference * to which is passed as argument. Type is passed using * Jackson specific type; instance of which can be constructed using * {@link TypeFactory}. * * @throws IOException if a low-level I/O problem (unexpected end-of-input, * network error) occurs (passed through as-is without additional wrapping -- note * that this is one case where {@link DeserializationFeature#WRAP_EXCEPTIONS} * does NOT result in wrapping of exception even if enabled) * @throws JsonParseException if underlying input contains invalid content * of type {@link JsonParser} supports (JSON for default case) * @throws JsonMappingException if the input JSON structure does not match structure * expected for result type (or has other mismatch issues) */ @Override @SuppressWarnings("unchecked") public final <T> T readValue(JsonParser p, ResolvedType valueType) throws IOException, JsonParseException, JsonMappingException { return (T) _readValue(getDeserializationConfig(), p, (JavaType) valueType); }
Example #5
Source File: ObjectMapper.java From lams with GNU General Public License v2.0 | 3 votes |
/** * Convenience method, equivalent in function to: *<pre> * readerFor(valueType).readValues(p); *</pre> *<p> * Method for reading sequence of Objects from parser stream. * Sequence can be either root-level "unwrapped" sequence (without surrounding * JSON array), or a sequence contained in a JSON Array. * In either case {@link JsonParser} <b>MUST</b> point to the first token of * the first element, OR not point to any token (in which case it is advanced * to the next token). This means, specifically, that for wrapped sequences, * parser MUST NOT point to the surrounding <code>START_ARRAY</code> (one that * contains values to read) but rather to the token following it which is the first * token of the first value to read. *<p> * Note that {@link ObjectReader} has more complete set of variants. */ @Override public <T> MappingIterator<T> readValues(JsonParser p, ResolvedType valueType) throws IOException, JsonProcessingException { return readValues(p, (JavaType) valueType); }
Example #6
Source File: ObjectReader.java From lams with GNU General Public License v2.0 | 2 votes |
/** * Convenience method that binds content read using given parser, using * configuration of this reader, except that expected value type * is specified with the call (instead of currently configured root type). * Value return is either newly constructed, or root value that * was specified with {@link #withValueToUpdate(Object)}. *<p> * NOTE: this method never tries to auto-detect format, since actual * (data-format specific) parser is given. */ @Override @SuppressWarnings("unchecked") public <T> T readValue(JsonParser p, ResolvedType valueType) throws IOException { return (T) forType((JavaType)valueType).readValue(p); }
Example #7
Source File: ObjectReader.java From lams with GNU General Public License v2.0 | 2 votes |
/** * Convenience method that is equivalent to: *<pre> * withType(valueType).readValues(p); *</pre> *<p> * Method reads a sequence of Objects from parser stream. * Sequence can be either root-level "unwrapped" sequence (without surrounding * JSON array), or a sequence contained in a JSON Array. * In either case {@link JsonParser} <b>MUST</b> point to the first token of * the first element, OR not point to any token (in which case it is advanced * to the next token). This means, specifically, that for wrapped sequences, * parser MUST NOT point to the surrounding <code>START_ARRAY</code> (one that * contains values to read) but rather to the token following it which is the first * token of the first value to read. *<p> * NOTE: this method never tries to auto-detect format, since actual * (data-format specific) parser is given. */ @Override public <T> Iterator<T> readValues(JsonParser p, ResolvedType valueType) throws IOException { return readValues(p, (JavaType) valueType); }
Example #8
Source File: ObjectCodec.java From lams with GNU General Public License v2.0 | 2 votes |
/** * Method to deserialize JSON content into a POJO, type specified * with fully resolved type object (so it can be a generic type, * including containers like {@link java.util.Collection} and * {@link java.util.Map}). */ public abstract <T> T readValue(JsonParser p, ResolvedType valueType) throws IOException;
Example #9
Source File: ObjectCodec.java From lams with GNU General Public License v2.0 | 2 votes |
/** * Method for reading sequence of Objects from parser stream, * all with same specified value type. */ public abstract <T> Iterator<T> readValues(JsonParser p, ResolvedType valueType) throws IOException;
Example #10
Source File: ObjectCodec.java From openbd-core with GNU General Public License v3.0 | 2 votes |
/** * Method to deserialize JSON content into a POJO, type specified * with fully resolved type object (so it can be a generic type, * including containers like {@link java.util.Collection} and * {@link java.util.Map}). */ public abstract <T> T readValue(JsonParser jp, ResolvedType valueType) throws IOException, JsonProcessingException;
Example #11
Source File: ObjectCodec.java From openbd-core with GNU General Public License v3.0 | 2 votes |
/** * Method for reading sequence of Objects from parser stream, * all with same specified value type. */ public abstract <T> Iterator<T> readValues(JsonParser jp, ResolvedType valueType) throws IOException, JsonProcessingException;