Skip to content

Commit 575a21f

Browse files
committed
fix
1 parent 4b85ffc commit 575a21f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ouroboros-network/orphan-instances/Ouroboros/Network/OrphanInstances.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ instance FromJSON DiffusionMode where
117117
_ -> fail "Parsing NodeDiffusionMode failed: can be either 'InitiatorOnly' or 'InitiatorAndResponder'"
118118

119119
instance ToJSON DiffusionMode where
120-
toJSON = String . pack . show
120+
toJSON InitiatorOnlyDiffusionMode = "InitiatorOnly"
121+
toJSON InitiatorAndResponderDiffusionMode = "InitiatorAndResponder"
122+
121123

122124
-- | Does not use the 'FromJSON' instance of 'RootConfig', so that
123125
-- 'accessPoints', 'advertise', 'valency' and 'warmValency' fields are attached

0 commit comments

Comments
 (0)