JsonBrowser

open class JsonBrowser

Allows to easily navigate in decoded JSON data

Properties

Link copied to clipboard
@get:NotNull
open var mapper: ObjectMapper
Link copied to clipboard

Functions

Link copied to clipboard
@NotNull
open fun <T> as(klass: Class<T>): @NotNull T
Attempt to retrieve the value in the specified format
Link copied to clipboard
open fun asBoolean(): Boolean
open fun asBoolean(defaultValue: Boolean): Boolean
Link copied to clipboard
open fun asInteger(): Int
open fun asInteger(defaultValue: Int): Int
Link copied to clipboard
open fun asLong(): Long
open fun asLong(defaultValue: Long): Long
Link copied to clipboard
@Nullable
open fun asNullableBoolean(): @Nullable Boolean
Link copied to clipboard
@Nullable
open fun asNullableInteger(): @Nullable Integer
Link copied to clipboard
@Nullable
open fun asNullableLong(): @Nullable Long
Link copied to clipboard
@NotNull
open fun create(node: JsonNode): @NotNull JsonBrowser
Link copied to clipboard
@Nullable
open fun format(): @Nullable String
Link copied to clipboard
@NotNull
open fun get(key: String): @NotNull JsonBrowser
Get an element by key from a map value
Link copied to clipboard
@NotNull
open fun index(index: Int): @NotNull JsonBrowser
Get an element at an index for a list value
Link copied to clipboard
open fun isList(): Boolean
Link copied to clipboard
open fun isMap(): Boolean
Link copied to clipboard
open fun isNull(): Boolean
Link copied to clipboard
@NotNull
open fun parse(stream: InputStream): @NotNull JsonBrowser
@NotNull
open fun parse(@Nullable json: @Nullable String): @NotNull JsonBrowser
Parse from string.
Link copied to clipboard
open fun put(key: String, item: Any)
Put a value into the map if this instance contains a map.
Link copied to clipboard
@NotNull
open fun safeText(): @NotNull String
Link copied to clipboard
@Nullable
open fun stringify(): @Nullable String
Link copied to clipboard
@Nullable
open fun text(): @Nullable String
Link copied to clipboard
@NotNull
open fun <K, V> toMap(): @NotNull Map<K, V>
Link copied to clipboard
open fun toString(): String
Link copied to clipboard
@NotNull
open fun values(): @NotNull List<JsonBrowser>
Returns a list of all the values in this element