mirror of
https://github.com/Smaug123/WoofWare.Myriad
synced 2025-10-08 05:28:39 +00:00
Cope with unit type in JSON (#262)
This commit is contained in:
@@ -147,6 +147,12 @@ module internal JsonSerializeGenerator =
|
||||
|> SynExpr.createLambda "field"
|
||||
|> fun e -> e, false
|
||||
| JsonNode -> SynExpr.createIdent "id", true
|
||||
| Unit ->
|
||||
SynExpr.createLambda
|
||||
"value"
|
||||
(SynExpr.createLongIdent [ "System" ; "Text" ; "Json" ; "Nodes" ; "JsonObject" ]
|
||||
|> SynExpr.applyTo (SynExpr.CreateConst ())),
|
||||
false
|
||||
| _ ->
|
||||
// {type}.toJsonNode
|
||||
let typeName =
|
||||
|
Reference in New Issue
Block a user