AutoMappingConfiguration
This is the generic interface used to configure auto-mapping functionality for message format libraries. The various methods here can be used to provide custom mapping behaviour (say for domain classes).
Functions
Link copied to clipboard
abstract fun <OUT> bigDecimal(mapping: BiDiMapping<BigDecimal, OUT>): AutoMappingConfiguration<BUILDER>
Link copied to clipboard
inline fun <BUILDER, OUT> AutoMappingConfiguration<BUILDER>.bigDecimal(noinline inFn: (BigDecimal) -> OUT, noinline outFn: (OUT) -> BigDecimal): AutoMappingConfiguration<BUILDER>
Link copied to clipboard
abstract fun <OUT> bigInteger(mapping: BiDiMapping<BigInteger, OUT>): AutoMappingConfiguration<BUILDER>
Link copied to clipboard
inline fun <BUILDER, OUT> AutoMappingConfiguration<BUILDER>.bigInteger(noinline inFn: (BigInteger) -> OUT, noinline outFn: (OUT) -> BigInteger): AutoMappingConfiguration<BUILDER>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <BUILDER, OUT> AutoMappingConfiguration<BUILDER>.localDateTime(noinline inFn: (LocalDateTime) -> OUT, noinline outFn: (OUT) -> LocalDateTime): AutoMappingConfiguration<BUILDER>
Link copied to clipboard
Link copied to clipboard
inline fun <BUILDER, OUT> AutoMappingConfiguration<BUILDER>.offsetDateTime(noinline inFn: (OffsetDateTime) -> OUT, noinline outFn: (OUT) -> OffsetDateTime): AutoMappingConfiguration<BUILDER>
Link copied to clipboard
inline fun <BUILDER, OUT> AutoMappingConfiguration<BUILDER>.offsetTime(noinline inFn: (OffsetTime) -> OUT, noinline outFn: (OUT) -> OffsetTime): AutoMappingConfiguration<BUILDER>
Link copied to clipboard
Prevent the unmarshalling of raw (unbounded) strings. Useful when we are taking data from the Internet and want to ensure that all inbound fields are represented by bounded or validated types.
Link copied to clipboard
Link copied to clipboard
inline fun <BUILDER, OUT> AutoMappingConfiguration<BUILDER>.text(noinline mapping: (OUT) -> String): AutoMappingConfiguration<BUILDER>
Utility method for when only writing/serialization is required
inline fun <BUILDER, OUT> AutoMappingConfiguration<BUILDER>.text(noinline mapping: (String) -> OUT): AutoMappingConfiguration<BUILDER>
Utility method for when only reading/deserialization is required
inline fun <BUILDER, OUT> AutoMappingConfiguration<BUILDER>.text(noinline inFn: (String) -> OUT, noinline outFn: (OUT) -> String): AutoMappingConfiguration<BUILDER>
This is the set of utility methods which avoid the noise of creating a BiDiMapping when specifying mappings.
Link copied to clipboard
inline fun <BUILD, VALUE : Value<T>, T : Any> AutoMappingConfiguration<BUILD>.value(fn: ValueFactory<VALUE, T>): AutoMappingConfiguration<BUILD>
inline fun <BUILD, VALUE : Value<BigDecimal>> AutoMappingConfiguration<BUILD>.value(fn: ValueFactory<VALUE, BigDecimal>): AutoMappingConfiguration<BUILD>
inline fun <BUILD, VALUE : Value<BigInteger>> AutoMappingConfiguration<BUILD>.value(fn: ValueFactory<VALUE, BigInteger>): AutoMappingConfiguration<BUILD>
inline fun <BUILD, VALUE : Value<Boolean>> AutoMappingConfiguration<BUILD>.value(fn: ValueFactory<VALUE, Boolean>): AutoMappingConfiguration<BUILD>
inline fun <BUILD, VALUE : Value<Double>> AutoMappingConfiguration<BUILD>.value(fn: ValueFactory<VALUE, Double>): AutoMappingConfiguration<BUILD>
inline fun <BUILD, VALUE : Value<Int>> AutoMappingConfiguration<BUILD>.value(fn: ValueFactory<VALUE, Int>): AutoMappingConfiguration<BUILD>
Link copied to clipboard
This is the set of (additional) standardised string <-> type mappings which http4k supports out of the box.
Link copied to clipboard
inline fun <BUILDER, OUT> AutoMappingConfiguration<BUILDER>.zonedDateTime(noinline inFn: (ZonedDateTime) -> OUT, noinline outFn: (OUT) -> ZonedDateTime): AutoMappingConfiguration<BUILDER>