summaryrefslogtreecommitdiff
path: root/lib/ur/json.ur
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ur/json.ur')
-rw-r--r--lib/ur/json.ur6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/ur/json.ur b/lib/ur/json.ur
index 58822d4b..1222cdbf 100644
--- a/lib/ur/json.ur
+++ b/lib/ur/json.ur
@@ -165,6 +165,10 @@ fun rfc3339_in s =
None => error <xml>Invalid RFC 3339 string "{[s]}"</xml>
| Some (time, sep, rest) =>
let
+ val time = case String.split time #"." of
+ None => time
+ | Some (time, _) => time
+
val t = case readUtc (date ^ " " ^ time) of
None => error <xml>Invalid RFC 3339 string "{[s]}"</xml>
| Some t => t
@@ -356,7 +360,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,