JSONValueDessertNgImpl

class JSONValueDessertNgImpl : JSONValue

Functions

getProperty
Link copied to clipboard
open override fun getProperty(property: String): Any?

If this JSON value is a JSON object, gets the raw Javascript object representing the value of a given property of this JSON object. If this JSON value is not a JSON object or if this JSON object has no property with the given name, then this method returns null.

getPropertyAs
Link copied to clipboard
open override fun <T : Any> getPropertyAs(property: String, type: Class<T>): T?

If this JSON value is a JSON object, gets the value of a given property as an object of a given type. If this JSON value is not a JSON object or if this JSON object has no property with the given name, then this method returns null. If the conversion is not possible, this method returns null.

getPropertyAsListOf
Link copied to clipboard
open override fun <T : Any> getPropertyAsListOf(property: String, type: Class<T>): List<T>?

If this JSON value is a JSON object, gets the value of a given property as a list of elements of a given type. If this JSON value is not a JSON object or if this JSON object has no property with the given name, then this method returns null. If the conversion of the given property is not possible (see getValueAsListOf), this method returns null.

getPropertyAsMapOf
Link copied to clipboard
open override fun <T : Any> getPropertyAsMapOf(property: String, type: Class<T>): Map<String, T>?

If this JSON value is a JSON object, gets the value of a given property as an associative map from String to a given type. If this JSON value is not a JSON object or if this JSON object has no property with the given name, then this method returns null. If the conversion of the given property is not possible (see getValueAsMapOf), this method returns null.

getValue
Link copied to clipboard
open override fun getValue(): Any?

Gets the raw Javascript object representing this JSON value.

getValueAs
Link copied to clipboard
open override fun <T : Any> getValueAs(type: Class<T>): T?

Gets this JSON value as an object of a given type. If the conversion is not possible, this method returns null.

getValueAsListOf
Link copied to clipboard
open override fun <T : Any> getValueAsListOf(type: Class<T>): List<T>?

Gets this JSON value as a list of elements of a given type. If the conversion is not possible (either the JSON value is not a list or one of its elements can't be converted to the given type), this method returns null.

getValueAsMapOf
Link copied to clipboard
open override fun <T : Any> getValueAsMapOf(type: Class<T>): Map<String, T>?

Gets this JSON value as an associative map from String to a given type. If the conversion is not possible (either the JSON value is not a map or one of its values can't be converted to the given type), this method returns null.

stringify
Link copied to clipboard
open override fun stringify(): String

Gets a string representation of this JSON value.

Properties

data
Link copied to clipboard
val data: TreeLikeData