Coverage Summary for Class: GhostUserTokenSerializer (com.ghost.serialization.integration.model)
| Class |
Class, %
|
Method, %
|
Branch, %
|
Line, %
|
Instruction, %
|
| GhostUserTokenSerializer |
100%
(1/1)
|
83.3%
(5/6)
|
|
88.9%
(8/9)
|
92.6%
(50/54)
|
@file:OptIn(InternalGhostApi::class)
package com.ghost.serialization.integration.model
import com.ghost.serialization.InternalGhostApi
import com.ghost.serialization.contract.GhostSerializer
import com.ghost.serialization.parser.GhostJsonFlatReader
import com.ghost.serialization.parser.GhostJsonReader
import com.ghost.serialization.parser.nextString
import com.ghost.serialization.writer.GhostJsonFlatWriter
import com.ghost.serialization.writer.GhostJsonWriter
/**
* High-performance serializer for [GhostUserToken].
* Generated by GhostSerialization. Do not modify manually.
*/
public object GhostUserTokenSerializer : GhostSerializer<GhostUserToken> {
override val typeName: String = "GhostUserToken"
/**
* Robust deserialization for [GhostUserToken].
*/
override fun deserialize(reader: GhostJsonReader): GhostUserToken = GhostUserToken(reader.nextString())
/**
* Robust deserialization for [GhostUserToken].
*/
override fun deserialize(reader: GhostJsonFlatReader): GhostUserToken = GhostUserToken(reader.nextString())
override fun serialize(writer: GhostJsonWriter, `value`: GhostUserToken) {
writer.value(value.`value`)
}
override fun serialize(writer: GhostJsonFlatWriter, `value`: GhostUserToken) {
writer.value(value.`value`)
}
override fun warmUp() {
try {
val reader1 = GhostJsonReader("{}".encodeToByteArray())
deserialize(reader1)
} catch (_: Exception) {
}
try {
val reader2 = GhostJsonFlatReader("{}".encodeToByteArray())
deserialize(reader2)
} catch (_: Exception) {
}
}
}