fix: specify behavior of the encoder for `TokenType` enums

This commit is contained in:
Richard Ramos 2024-10-08 12:12:14 -04:00
parent d6d405f8b3
commit 72ca466957
No known key found for this signature in database
GPG Key ID: 1CE87DB518195760
1 changed files with 4 additions and 0 deletions

View File

@ -1,3 +1,5 @@
import "json_serialization"
type
ContentType* {.pure.} = enum
NewMessagesMarker = -3
@ -92,6 +94,8 @@ type TokenType* {.pure.} = enum
Unknown = 4,
ENS = 5
TokenType.configureJsonSerialization(EnumAsNumber)
type RequestToJoinState* {.pure.} = enum
None = 0
InProgress