add JSON instances for SwitchPhase (#552)

This commit is contained in:
Evgeny Poberezkin authored and GitHub committed 2022-10-31 17:09:01 +00:00
1 parent 8d9816809f
commit 561649a498
1 file changed
+7
+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]