Class JacksonResponse.JsonReader

  • Enclosing class:
    JacksonResponse

    public static final class JacksonResponse.JsonReader
    extends Object
    A tree representation views of JSON documents.
    Since:
    1.17.1
    • Constructor Detail

      • JsonReader

        public JsonReader​(byte[] bytes)
        Public constructor.
        Parameters:
        bytes - The HTTP response body as an array of bytes.
    • Method Detail

      • readArray

        public com.fasterxml.jackson.databind.node.ArrayNode readArray()
                                                                throws IOException
        Returns a mutable JSON array node, if the parsed JSON is a valid array.
        Returns:
        JSON array node.
        Throws:
        IOException - If the body is not a valid JSON or JSON array.
      • readObject

        public com.fasterxml.jackson.databind.node.ObjectNode readObject()
                                                                  throws IOException
        Returns a mutable JSON object node, if the parsed JSON is a valid object.
        Returns:
        JSON object node.
        Throws:
        IOException - If the body is not a valid JSON or JSON object.
      • read

        public com.fasterxml.jackson.databind.JsonNode read()
                                                     throws IOException
        Returns an immutable JSON node.
        Returns:
        JSON node.
        Throws:
        IOException - If the body is not a valid JSON.