ValueProcessor

Callback interface that can be applied to Members to process values before they are written. Typically used to filter values, for example to reduce superfluous information or sanitize sensitive data.

Parameters

<T>

the value type

Functions

Link copied to clipboard
open fun <T> of(type: Class<out T>, action: UnaryOperator<T>): JsonWriter.ValueProcessor<T>
Factory method to crate a new ValueProcessor that applies the given action.
Link copied to clipboard
abstract fun processValue(path: JsonWriter.MemberPath, value: T): T
Process the value at the given path.
Link copied to clipboard
open fun when(predicate: Predicate<T>): JsonWriter.ValueProcessor<T>
Return a new processor from this one that only applies to member with values that match the given predicate.
Link copied to clipboard
Return a new processor from this one that only applied to members with the given path.
Return a new processor from this one that only applied to members that match the given path predicate.
Link copied to clipboard
Return a new processor from this one that only applied to members with the given path (ignoring escape characters).
Link copied to clipboard
Return a new processor from this one that only applies to member with values of the given type.