Companion

object Companion

Functions

Link copied to clipboard

Reduces every answer in the response to one plain value keyed by question name: a proposition's Boolean answer, a choice's selected category id, or a rating's selected level id. An answer whose outcome carries no such value is left out and reported instead, including a rating that was answered with only a score or a distribution and no selected level.

Link copied to clipboard
fun <T : Any> of(response: DecisionResponse, type: <Error class: unknown class><T>): DecisionProjection<T>

Projects the response's answered values onto type, using a default JSON mapper to do the conversion. Use this overload for a generic target type, such as a map.

fun <T : Any> of(response: DecisionResponse, type: Class<T>): DecisionProjection<T>

Projects the response's answered values onto type, using a default JSON mapper to do the conversion.

fun <T : Any> of(response: DecisionResponse, type: <Error class: unknown class><T>, mapper: <Error class: unknown class>): DecisionProjection<T>

Projects the response's answered values onto type, using mapper to do the conversion. Use this overload for a generic target type, such as a map.

fun <T : Any> of(response: DecisionResponse, type: Class<T>, mapper: <Error class: unknown class>): DecisionProjection<T>

Projects the response's answered values onto type, using mapper to do the conversion.