File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -31,10 +31,10 @@ data TestRequest = TestRequest Text (Maybe (Either Object Array)) (Maybe TestId)
31
31
32
32
instance ToJSON TestRequest where
33
33
toJSON (TestRequest name params i) = object pairs
34
- where pairs = catMaybes [Just $ " method" .= toJSON name, idPair, paramsPair]
34
+ where pairs = catMaybes [Just $ " method" .= name, idPair, paramsPair]
35
35
idPair = (" id" .= ) <$> i
36
36
paramsPair = either toPair toPair <$> params
37
- where toPair v = " params" .= toJSON v
37
+ where toPair v = " params" .= v
38
38
39
39
data TestResponse = TestResponse { rspId :: TestId
40
40
, rspResult :: Either TestRpcError Value }
@@ -59,8 +59,8 @@ instance FromJSON TestId where
59
59
60
60
instance ToJSON TestId where
61
61
toJSON i = case i of
62
- IdString x -> toJSON x
63
- IdNumber x -> toJSON x
62
+ IdString x -> String x
63
+ IdNumber x -> Number x
64
64
IdNull -> Null
65
65
66
66
versionKey :: Text
You can’t perform that action at this time.
0 commit comments