public static final class JacksonResponse.JsonReader extends Object
Constructor and Description |
---|
JsonReader(byte[] bytes)
Public constructor.
|
Modifier and Type | Method and Description |
---|---|
com.fasterxml.jackson.databind.JsonNode |
read()
Returns an immutable JSON node.
|
com.fasterxml.jackson.databind.node.ArrayNode |
readArray()
Returns a mutable JSON array node, if the parsed JSON is a valid
array.
|
com.fasterxml.jackson.databind.node.ObjectNode |
readObject()
Returns a mutable JSON object node, if the parsed JSON is a valid
object.
|
public JsonReader(byte[] bytes)
bytes
- The HTTP response body as an array of bytes.public com.fasterxml.jackson.databind.node.ArrayNode readArray() throws IOException
IOException
- If the body is not a valid JSON or JSON array.public com.fasterxml.jackson.databind.node.ObjectNode readObject() throws IOException
IOException
- If the body is not a valid JSON or JSON object.public com.fasterxml.jackson.databind.JsonNode read() throws IOException
IOException
- If the body is not a valid JSON.Copyright © 2012–2021 jcabi.com. All rights reserved.