/** * Method to deserialize JSON content into equivalent "tree model", * represented by root {@link TreeNode} of resulting model. * For JSON Arrays it will an array node (with child nodes), * for objects object node (with child nodes), and for other types * matching leaf node type. Empty or whitespace documents are null. * * @return root of the document, or null if empty or whitespace. */ @SuppressWarnings("unchecked") public <T extends TreeNode> T readValueAsTree() throws IOException { return (T) _codec().readTree(this); }
/** * Method for reading sequence of Objects from parser stream, * all with same specified value type. */ public <T> Iterator<T> readValuesAs(TypeReference<?> valueTypeRef) throws IOException { return _codec().readValues(this, valueTypeRef); }
/** * Method for reading sequence of Objects from parser stream, * all with same specified value type. */ public <T> Iterator<T> readValuesAs(Class<T> valueType) throws IOException { return _codec().readValues(this, valueType); }
/** * Method to deserialize JSON content into a Java type, reference * to which is passed as argument. Type is passed using so-called * "super type token" * and specifically needs to be used if the root type is a * parameterized (generic) container type. * <b>Note</b>: method can only be called if the parser has * an object codec assigned; this is true for parsers constructed * by <code>MappingJsonFactory</code> (defined in 'jackson-databind' bundle) * but not for {@link JsonFactory} (unless its <code>setCodec</code> * method has been explicitly called). *<p> * This method may advance the event stream, for structured types * the current token will be the closing end marker (END_ARRAY, * END_OBJECT) of the bound structure. For non-structured Json types * (and for {@link JsonToken#VALUE_EMBEDDED_OBJECT}) * stream is not advanced. */ @SuppressWarnings("unchecked") public <T> T readValueAs(TypeReference<?> valueTypeRef) throws IOException { return (T) _codec().readValue(this, valueTypeRef); }
/** * Method to deserialize JSON content into a non-container * type (it can be an array type, however): typically a bean, array * or a wrapper type (like {@link java.lang.Boolean}). * <b>Note</b>: method can only be called if the parser has * an object codec assigned; this is true for parsers constructed * by <code>MappingJsonFactory</code> (from "jackson-databind" jar) * but not for {@link JsonFactory} (unless its <code>setCodec</code> * method has been explicitly called). *<p> * This method may advance the event stream, for structured types * the current token will be the closing end marker (END_ARRAY, * END_OBJECT) of the bound structure. For non-structured Json types * (and for {@link JsonToken#VALUE_EMBEDDED_OBJECT}) * stream is not advanced. *<p> * Note: this method should NOT be used if the result type is a * container ({@link java.util.Collection} or {@link java.util.Map}. * The reason is that due to type erasure, key and value types * can not be introspected when using this method. */ public <T> T readValueAs(Class<T> valueType) throws IOException { return _codec().readValue(this, valueType); }
/** * Method to deserialize JSON content into equivalent "tree model", * represented by root {@link TreeNode} of resulting model. * For JSON Arrays it will an array node (with child nodes), * for objects object node (with child nodes), and for other types * matching leaf node type. Empty or whitespace documents are null. * * @return root of the document, or null if empty or whitespace. */ @SuppressWarnings("unchecked") public <T extends TreeNode> T readValueAsTree() throws IOException { return (T) _codec().readTree(this); }
/** * Method to deserialize JSON content into equivalent "tree model", * represented by root {@link TreeNode} of resulting model. * For JSON Arrays it will an array node (with child nodes), * for objects object node (with child nodes), and for other types * matching leaf node type. Empty or whitespace documents are null. * * @return root of the document, or null if empty or whitespace. */ @SuppressWarnings("unchecked") public <T extends TreeNode> T readValueAsTree() throws IOException { return (T) _codec().readTree(this); }
/** * Method to deserialize JSON content into equivalent "tree model", * represented by root {@link TreeNode} of resulting model. * For JSON Arrays it will an array node (with child nodes), * for objects object node (with child nodes), and for other types * matching leaf node type. Empty or whitespace documents are null. * * @return root of the document, or null if empty or whitespace. */ @SuppressWarnings("unchecked") public <T extends TreeNode> T readValueAsTree() throws IOException { return (T) _codec().readTree(this); }
/** * Method to deserialize JSON content into equivalent "tree model", * represented by root {@link TreeNode} of resulting model. * For JSON Arrays it will an array node (with child nodes), * for objects object node (with child nodes), and for other types * matching leaf node type. Empty or whitespace documents are null. * * @return root of the document, or null if empty or whitespace. */ @SuppressWarnings("unchecked") public <T extends TreeNode> T readValueAsTree() throws IOException { return (T) _codec().readTree(this); }
/** * Method for reading sequence of Objects from parser stream, * all with same specified value type. */ public <T> Iterator<T> readValuesAs(TypeReference<?> valueTypeRef) throws IOException { return _codec().readValues(this, valueTypeRef); }
/** * Method for reading sequence of Objects from parser stream, * all with same specified value type. */ public <T> Iterator<T> readValuesAs(Class<T> valueType) throws IOException { return _codec().readValues(this, valueType); }
/** * Method for reading sequence of Objects from parser stream, * all with same specified value type. */ public <T> Iterator<T> readValuesAs(TypeReference<?> valueTypeRef) throws IOException { return _codec().readValues(this, valueTypeRef); }
/** * Method for reading sequence of Objects from parser stream, * all with same specified value type. */ public <T> Iterator<T> readValuesAs(TypeReference<?> valueTypeRef) throws IOException { return _codec().readValues(this, valueTypeRef); }
/** * Method for reading sequence of Objects from parser stream, * all with same specified value type. */ public <T> Iterator<T> readValuesAs(TypeReference<?> valueTypeRef) throws IOException { return _codec().readValues(this, valueTypeRef); }
/** * Method for reading sequence of Objects from parser stream, * all with same specified value type. */ public <T> Iterator<T> readValuesAs(Class<T> valueType) throws IOException { return _codec().readValues(this, valueType); }
/** * Method for reading sequence of Objects from parser stream, * all with same specified value type. */ public <T> Iterator<T> readValuesAs(Class<T> valueType) throws IOException { return _codec().readValues(this, valueType); }
/** * Method for reading sequence of Objects from parser stream, * all with same specified value type. */ public <T> Iterator<T> readValuesAs(Class<T> valueType) throws IOException { return _codec().readValues(this, valueType); }
/** * Method to deserialize JSON content into a non-container * type (it can be an array type, however): typically a bean, array * or a wrapper type (like {@link java.lang.Boolean}). * <b>Note</b>: method can only be called if the parser has * an object codec assigned; this is true for parsers constructed * by <code>MappingJsonFactory</code> (from "jackson-databind" jar) * but not for {@link JsonFactory} (unless its <code>setCodec</code> * method has been explicitly called). *<p> * This method may advance the event stream, for structured types * the current token will be the closing end marker (END_ARRAY, * END_OBJECT) of the bound structure. For non-structured Json types * (and for {@link JsonToken#VALUE_EMBEDDED_OBJECT}) * stream is not advanced. *<p> * Note: this method should NOT be used if the result type is a * container ({@link java.util.Collection} or {@link java.util.Map}. * The reason is that due to type erasure, key and value types * can not be introspected when using this method. */ public <T> T readValueAs(Class<T> valueType) throws IOException { return _codec().readValue(this, valueType); }
/** * Method to deserialize JSON content into a Java type, reference * to which is passed as argument. Type is passed using so-called * "super type token" * and specifically needs to be used if the root type is a * parameterized (generic) container type. * <b>Note</b>: method can only be called if the parser has * an object codec assigned; this is true for parsers constructed * by <code>MappingJsonFactory</code> (defined in 'jackson-databind' bundle) * but not for {@link JsonFactory} (unless its <code>setCodec</code> * method has been explicitly called). *<p> * This method may advance the event stream, for structured types * the current token will be the closing end marker (END_ARRAY, * END_OBJECT) of the bound structure. For non-structured Json types * (and for {@link JsonToken#VALUE_EMBEDDED_OBJECT}) * stream is not advanced. */ @SuppressWarnings("unchecked") public <T> T readValueAs(TypeReference<?> valueTypeRef) throws IOException { return (T) _codec().readValue(this, valueTypeRef); }
/** * Method to deserialize JSON content into a Java type, reference * to which is passed as argument. Type is passed using so-called * "super type token" * and specifically needs to be used if the root type is a * parameterized (generic) container type. * <b>Note</b>: method can only be called if the parser has * an object codec assigned; this is true for parsers constructed * by <code>MappingJsonFactory</code> (defined in 'jackson-databind' bundle) * but not for {@link JsonFactory} (unless its <code>setCodec</code> * method has been explicitly called). *<p> * This method may advance the event stream, for structured types * the current token will be the closing end marker (END_ARRAY, * END_OBJECT) of the bound structure. For non-structured Json types * (and for {@link JsonToken#VALUE_EMBEDDED_OBJECT}) * stream is not advanced. */ @SuppressWarnings("unchecked") public <T> T readValueAs(TypeReference<?> valueTypeRef) throws IOException { return (T) _codec().readValue(this, valueTypeRef); }