object Companion
source · line 73public
public companion : ValueEncoder<YearMonth>, ValueDecoder<YearMonth>
- Supertype
ValueEncoder<YearMonth> - Supertype
ValueDecoder<YearMonth>
Value construction and serialization helpers.
function parseOrNone
source · line 87public
public fun parseOrNone(text: String): YearMonth?
Parses ISO year-month, returning None for malformed or out-of-range input.
parameter text
source · line 87public
text: String
function encode
source · line 77public
public override fun encode(value: YearMonth, encoder: Encoder): Unit
- Overrides
encode
Encodes the value as its canonical text representation.
parameter value
source · line 77public
value: YearMonth
parameter encoder
source · line 77public
encoder: Encoder
function parse
source · line 94public
public fun parse(text: String): YearMonth
Parses ISO year-month or throws IllegalArgumentException for invalid input.
parameter text
source · line 94public
text: String
function decode
source · line 81public
public override fun decode(decoder: Decoder): YearMonth
- Overrides
decode
Reads a string value and validates it using this type's parser.
parameter decoder
source · line 81public
decoder: Decoder