RequestId

Represents a JSON-RPC 2.0 request identifier.

Per the specification, an id can be a String, an integer Number, or null. The null case is represented by a nullable RequestId? at the usage site.

Use factory functions RequestId to construct instances:

val stringId: RequestId = RequestId("abc-123")
val intId: RequestId = RequestId(42)

See also

Inheritors

Types

Link copied to clipboard
data class NumericId(val value: Long) : RequestId

An integer-valued request identifier.

Link copied to clipboard
data class StringId(val value: String) : RequestId

A string-valued request identifier.