Interface JsonObject

  • All Superinterfaces:
    JsonNode

    public interface JsonObject
    extends JsonNode
    Interface that represents a JSON object.
    • Method Detail

      • fieldNames

        Stream<String> fieldNames()
        Returns:
        Stream for all field names in the object.
      • get

        JsonNode get​(String name)
        Gets the JsonNode field with the specified name in the object.
        Parameters:
        name - Name of the node.
        Returns:
        JsonNode for the specified field in the object if it exist, null otherwise.
      • has

        boolean has​(String name)
        Returns whether the object has a value for the specified field.
        Parameters:
        name - Name of the node.
        Returns:
        Whether the object has a value for the specified field.
      • remove

        JsonNode remove​(String name)
        Removes the JsonNode with the specified name from the object.
        Parameters:
        name - Name of the node.
        Returns:
        JsonNode removed from the object if it existed, null otherwise.
      • set

        JsonNode set​(String name,
                     JsonNode jsonNode)
        Sets the JsonNode field with the specified name with a new node value.
        Parameters:
        name - Name of the node.
        jsonNode - The new JsonNode value.
        Returns:
        The old JsonNode value if it was set, null otherwise.