Commit a10fbf1c authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[Update] fix node update JSON serialization

parent e4531010
Pipeline #1797 canceled with stage
...@@ -18,10 +18,18 @@ derive instance Generic UpdateNodeParams _ ...@@ -18,10 +18,18 @@ derive instance Generic UpdateNodeParams _
instance Show UpdateNodeParams where show = genericShow instance Show UpdateNodeParams where show = genericShow
instance JSON.ReadForeign UpdateNodeParams where readImpl = JSONG.untaggedSumRep instance JSON.ReadForeign UpdateNodeParams where readImpl = JSONG.untaggedSumRep
instance JSON.WriteForeign UpdateNodeParams where instance JSON.WriteForeign UpdateNodeParams where
writeImpl (UpdateNodeParamsList { methodList }) = JSON.writeImpl { methodList } writeImpl (UpdateNodeParamsList { methodList }) =
writeImpl (UpdateNodeParamsGraph { methodGraph }) = JSON.writeImpl { methodGraph } JSON.writeImpl { type: "UpdateNodeParamsList"
writeImpl (UpdateNodeParamsTexts { methodTexts }) = JSON.writeImpl { methodTexts } , values: methodList }
writeImpl (UpdateNodeParamsBoard { methodBoard }) = JSON.writeImpl { methodBoard } writeImpl (UpdateNodeParamsGraph { methodGraph }) =
JSON.writeImpl { type: "UpdateNodeParamsGraph"
, methodGraph }
writeImpl (UpdateNodeParamsTexts { methodTexts }) =
JSON.writeImpl { type: "UpdateNodeParamsTexts"
, methodTexts }
writeImpl (UpdateNodeParamsBoard { methodBoard }) =
JSON.writeImpl { type: "UpdateNodeParamsBoard"
, methodBoard }
---------------------------------------------------------------------- ----------------------------------------------------------------------
data Method = Basic | Advanced | WithModel data Method = Basic | Advanced | WithModel
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment