diff options
author | Adam Chlipala <adam@chlipala.net> | 2019-12-19 11:58:13 -0500 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2019-12-19 11:58:13 -0500 |
commit | 383e3a559b65432e9e2357dc35670ce147be96da (patch) | |
tree | 97ddc866a7ca97f3c0e5a730a4a6006ab983b0d5 /lib/ur | |
parent | f48703bf1b39c94c941ba101c3d2fd56a78d8289 (diff) |
Fix toJson for records with optional fields
Diffstat (limited to 'lib/ur')
-rw-r--r-- | lib/ur/json.ur | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ur/json.ur b/lib/ur/json.ur index 58822d4b..eed52fd6 100644 --- a/lib/ur/json.ur +++ b/lib/ur/json.ur @@ -356,7 +356,7 @@ fun json_record_withOptional [ts ::: {Type}] [ots ::: {Type}] [ts ~ ots] escape name ^ ":" ^ j.ToJson v ^ (case acc of "" => "" | acc => "," ^ acc)) - "" ofl ojss onames (r --- _) + withRequired ofl ojss onames (r --- _) in "{" ^ withOptional ^ "}" end, |