ValuePropertyDefinition
Represents a value-based property definition in a JSON Schema.
This is a sealed interface that extends from PropertyDefinition and serves as the base for properties that define specific types, such as strings, numbers, arrays, objects, and booleans. Each implementation of this interface allows defining additional type-specific constraints and attributes.
Parameters
The native Kotlin type that this property definition represents (e.g., String, Double, Boolean). The type parameter enables type-safe accessors for default and const values while maintaining JSON Schema 2020-12 spec compliance by storing values as JsonElement during serialization.
Inheritors
Properties
Const value as JsonElement (spec-compliant storage). Can be any JSON value per JSON Schema 2020-12 spec.
Default value as JsonElement (spec-compliant storage). Can be any JSON value per JSON Schema 2020-12 spec.
Functions
Returns the const value converted to the native Kotlin type T. Returns null if the value is null or cannot be converted to type T.
Returns the default value converted to the native Kotlin type T. Returns null if the value is null or cannot be converted to type T.