From 7dc460aece761171338fe61f1a6d601e3d0b6e62 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Mon, 23 Dec 2019 16:52:46 -0500 Subject: More lenient RFC 3339 parsing --- lib/ur/json.ur | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ur/json.ur b/lib/ur/json.ur index eed52fd6..1222cdbf 100644 --- a/lib/ur/json.ur +++ b/lib/ur/json.ur @@ -165,6 +165,10 @@ fun rfc3339_in s = None => error Invalid RFC 3339 string "{[s]}" | 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 Invalid RFC 3339 string "{[s]}" | Some t => t -- cgit v1.2.3