From 383e3a559b65432e9e2357dc35670ce147be96da Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Thu, 19 Dec 2019 11:58:13 -0500 Subject: Fix toJson for records with optional fields --- lib/ur/json.ur | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, -- cgit v1.2.3