add JSON instances for SwitchPhase (#552)

This commit is contained in:
Evgeny Poberezkin
2022-10-31 17:09:01 +00:00
committed by GitHub
parent 8d9816809f
commit 561649a498
+7
View File
@@ -360,6 +360,13 @@ instance StrEncoding SwitchPhase where
"completed" -> pure SPCompleted
_ -> fail "bad SwitchPhase"
instance ToJSON SwitchPhase where
toEncoding = strToJEncoding
toJSON = strToJSON
instance FromJSON SwitchPhase where
parseJSON = strParseJSON "SwitchPhase"
data ConnectionStats = ConnectionStats
{ rcvServers :: [SMPServer],
sndServers :: [SMPServer]