Class JsonPatchFactory


  • public class JsonPatchFactory
    extends Object
    A JsonPatchFactory is able to create a JsonPatch from a JsonNode.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static com.github.fge.msgsimple.bundle.MessageBundle BUNDLE  
      protected com.fasterxml.jackson.databind.ObjectMapper mapper  
      protected com.fasterxml.jackson.databind.ObjectReader reader  
      protected com.fasterxml.jackson.databind.ObjectWriter writer  
    • Constructor Summary

      Constructors 
      Constructor Description
      JsonPatchFactory​(com.fasterxml.jackson.databind.ObjectMapper mapper)  
    • Field Detail

      • BUNDLE

        protected static final com.github.fge.msgsimple.bundle.MessageBundle BUNDLE
      • mapper

        protected final com.fasterxml.jackson.databind.ObjectMapper mapper
      • reader

        protected final com.fasterxml.jackson.databind.ObjectReader reader
      • writer

        protected final com.fasterxml.jackson.databind.ObjectWriter writer
    • Constructor Detail

      • JsonPatchFactory

        public JsonPatchFactory​(com.fasterxml.jackson.databind.ObjectMapper mapper)
    • Method Detail

      • getReader

        public com.fasterxml.jackson.databind.ObjectReader getReader()
      • getWriter

        public com.fasterxml.jackson.databind.ObjectWriter getWriter()
      • fromJson

        public JsonPatch fromJson​(com.fasterxml.jackson.databind.JsonNode node)
                           throws IOException
        Builds a JSON Patch out of a JSON representation with support for an extended set of JSON patch operations
        Parameters:
        node - the JSON representation of the generated JSON Patch
        Returns:
        a JSON Patch
        Throws:
        IOException - input is not a valid JSON patch
        NullPointerException - input is null