Package-level declarations

Types

Link copied to clipboard
data class DeserializationException(val message: String?) : Exception

Represents an exception that occurred when deserializing a JSONElement.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class DoNotSerialize

Class properties annotated with DoNotSerialize are not serialized to JSON.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class SerializeAs(val value: String)

Class properties annotated with SerializeAs(someName) ignore their name and are serialized as "someName" instead.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class Stringify

Class properties annotated with Stringify are serialized as Strings regardless of their type.

Functions

Link copied to clipboard

Deserializes a JSON element json to this class. Returns an object of type Any corresponding to the deserialized object.

Link copied to clipboard

Serializes this object to an abstract JSONElement.