Class JsonPatch

java.lang.Object
ai.timefold.solver.service.json.internal.patch.JsonPatch

public class JsonPatch extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    protected static com.fasterxml.jackson.databind.JsonNode
    add(com.fasterxml.jackson.databind.JsonNode doc, String path, com.fasterxml.jackson.databind.JsonNode value)
    Perform a JSON patch "add" operation on a JSON document
    static com.fasterxml.jackson.databind.JsonNode
    apply(com.fasterxml.jackson.databind.node.ArrayNode patch, com.fasterxml.jackson.databind.JsonNode source)
    Applies all JSON patch operations to a JSON document.
    protected static com.fasterxml.jackson.databind.JsonNode
    perform(com.fasterxml.jackson.databind.node.ObjectNode operation, com.fasterxml.jackson.databind.JsonNode doc)
    Perform one JSON patch operation
    protected static com.fasterxml.jackson.databind.JsonNode
    remove(com.fasterxml.jackson.databind.JsonNode doc, String path)
    Perform a JSON patch "remove" operation on a JSON document
    protected static com.fasterxml.jackson.databind.JsonNode
    replace(com.fasterxml.jackson.databind.JsonNode doc, String path, com.fasterxml.jackson.databind.JsonNode value)
    Perform a JSON patch "replace" operation on a JSON document

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • apply

      public static com.fasterxml.jackson.databind.JsonNode apply(com.fasterxml.jackson.databind.node.ArrayNode patch, com.fasterxml.jackson.databind.JsonNode source)
      Applies all JSON patch operations to a JSON document.
      Returns:
      the patched JSON document
    • perform

      protected static com.fasterxml.jackson.databind.JsonNode perform(com.fasterxml.jackson.databind.node.ObjectNode operation, com.fasterxml.jackson.databind.JsonNode doc)
      Perform one JSON patch operation
      Returns:
      the patched JSON document
    • add

      protected static com.fasterxml.jackson.databind.JsonNode add(com.fasterxml.jackson.databind.JsonNode doc, String path, com.fasterxml.jackson.databind.JsonNode value)
      Perform a JSON patch "add" operation on a JSON document
      Returns:
      the patched JSON document
    • remove

      protected static com.fasterxml.jackson.databind.JsonNode remove(com.fasterxml.jackson.databind.JsonNode doc, String path)
      Perform a JSON patch "remove" operation on a JSON document
      Returns:
      the patched JSON document
    • replace

      protected static com.fasterxml.jackson.databind.JsonNode replace(com.fasterxml.jackson.databind.JsonNode doc, String path, com.fasterxml.jackson.databind.JsonNode value)
      Perform a JSON patch "replace" operation on a JSON document
      Returns:
      the patched JSON document