Enum EPatchOperation

    • Enum Constant Detail

      • add

        public static final EPatchOperation add
        Adds an item at the specified position of an array or object.
      • remove

        public static final EPatchOperation remove
        Removes an item at the specified position of an array or object.
      • replace

        public static final EPatchOperation replace
        Replaces an item at the specified position of an array or object with the given value.
    • Method Detail

      • values

        public static EPatchOperation[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (EPatchOperation c : EPatchOperation.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static EPatchOperation valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • apply

        public abstract void apply​(com.alibaba.fastjson.JSON json,
                                   Object[] path,
                                   Object value)
        Applies this JSON patch operation.
        Parameters:
        json - Root JSON object to which to apply the operation.
        path - Path at which to apply the operation.
        value - For replace, the new value to set at the given path.
      • getAtPath

        protected static com.alibaba.fastjson.JSON getAtPath​(com.alibaba.fastjson.JSON json,
                                                             Object[] path)