org.http4k.chaos.chaosExt.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of http4k-testing-chaos Show documentation
Show all versions of http4k-testing-chaos Show documentation
Http4k support for chaos testing
package org.http4k.chaos
import com.fasterxml.jackson.databind.JsonNode
import org.http4k.format.Jackson.asA
internal inline fun JsonNode.asNullable(name: String): T? = if (hasNonNull(name)) this[name].asA() else null
internal inline fun JsonNode.nonNullable(name: String): T = this[name].asA()