get

operator fun get(key: DataItem): DataItem
operator fun get(key: String): DataItem

Gets the value of a key in a map.

Return

the DataItem for the given key.

Parameters

key

the key to get the value for.

Throws

if the data item isn't a CborMap.

if the value doesn't exist in the map.


operator fun get(key: Long): DataItem

Gets the value of a key in a map or an index in an array

Return

the DataItem for the given key or index.

Parameters

key

the key or index to get the value for.

Throws

if the data item isn't a CborMap or CborArray.

if the value doesn't exist in the map.

if an array and the index is out of bounds.