fix: specify behavior of the encoder for `TokenType` enums
This commit is contained in:
parent
d6d405f8b3
commit
72ca466957
|
@ -1,3 +1,5 @@
|
||||||
|
import "json_serialization"
|
||||||
|
|
||||||
type
|
type
|
||||||
ContentType* {.pure.} = enum
|
ContentType* {.pure.} = enum
|
||||||
NewMessagesMarker = -3
|
NewMessagesMarker = -3
|
||||||
|
@ -92,6 +94,8 @@ type TokenType* {.pure.} = enum
|
||||||
Unknown = 4,
|
Unknown = 4,
|
||||||
ENS = 5
|
ENS = 5
|
||||||
|
|
||||||
|
TokenType.configureJsonSerialization(EnumAsNumber)
|
||||||
|
|
||||||
type RequestToJoinState* {.pure.} = enum
|
type RequestToJoinState* {.pure.} = enum
|
||||||
None = 0
|
None = 0
|
||||||
InProgress
|
InProgress
|
||||||
|
|
Loading…
Reference in New Issue