DiffOptions

class DiffOptions(val includeTypes: Boolean = false, val ignoreKeys: Set<String> = emptySet(), val ignorePaths: Set<String> = emptySet(), val maxDifferences: Int = 1000, val maxValueBytes: Int = 1024, val verifySkippedSubtrees: Boolean = false)(source)

How a diff is computed and reported (SPEC.md §9.3): includeTypes, ignoreKeys and ignorePaths compare values as in CompareOptions, and

  • maxDifferences: the diff stops after this many differences;

  • maxValueBytes: DiffValue.json holds at most this many bytes of UTF-8;

  • verifySkippedSubtrees: compare values whose canonical hashes are equal instead of taking them as equal. The hash isn't collision-resistant against an adversary (SPEC.md §13).

Constructors

Link copied to clipboard
constructor(includeTypes: Boolean = false, ignoreKeys: Set<String> = emptySet(), ignorePaths: Set<String> = emptySet(), maxDifferences: Int = 1000, maxValueBytes: Int = 1024, verifySkippedSubtrees: Boolean = false)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun copy(includeTypes: Boolean = this.includeTypes, ignoreKeys: Set<String> = this.ignoreKeys, ignorePaths: Set<String> = this.ignorePaths, maxDifferences: Int = this.maxDifferences, maxValueBytes: Int = this.maxValueBytes, verifySkippedSubtrees: Boolean = this.verifySkippedSubtrees): DiffOptions

These options with the given ones changed; the result is validated like a new instance.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String