com.marklogic.xcc.types

## Interface JsonItem

- All Superinterfaces:
    XdmItem, XdmValue
  All Known Subinterfaces:
    ArrayNode, BooleanNode, NullNode, NumberNode, ObjectNode

      public interface JsonItem
      extends XdmItem

  Interface for JSON item values.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `com.fasterxml.jackson.databind.JsonNode` | `asJsonNode()`
    `com.fasterxml.jackson.databind.JsonNode` | `asJsonNode(com.fasterxml.jackson.databind.ObjectMapper mapper)`

    - ### Methods inherited from interface com.marklogic.xcc.types.XdmItem

      `asInputStream, asReader, getItemType, isCached, writeTo, writeTo`

    - ### Methods inherited from interface com.marklogic.xcc.types.XdmValue

      `asString, getValueType`

- - ### Method Detail

    - #### asJsonNode

          com.fasterxml.jackson.databind.JsonNode asJsonNode()
                                                      throws com.fasterxml.jackson.core.JsonParseException,
                                                             com.fasterxml.jackson.databind.JsonMappingException,
                                                             java.io.IOException

      Returns:
        The value of this item as a JsonNode object.
      Throws:
        `com.fasterxml.jackson.core.JsonParseException`
        `com.fasterxml.jackson.databind.JsonMappingException`
        `java.io.IOException`

    - #### asJsonNode

          com.fasterxml.jackson.databind.JsonNode asJsonNode(com.fasterxml.jackson.databind.ObjectMapper mapper)
                                                      throws com.fasterxml.jackson.core.JsonParseException,
                                                             com.fasterxml.jackson.databind.JsonMappingException,
                                                             java.io.IOException

      Returns:
        The value of this item as a JsonNode object.
      Throws:
        `com.fasterxml.jackson.core.JsonParseException`
        `com.fasterxml.jackson.databind.JsonMappingException`
        `java.io.IOException`

Copyright © 2025 MarkLogic Corporation. All Rights Reserved.

Complete online documentation for MarkLogic Server, XQuery and related components may be found at developer.marklogic.com