Skip to content

Commit 7ba10f8

Browse files
authored
FromJSON URI use parseURIReference
Support round-trip reference (local) uris
1 parent cb75115 commit 7ba10f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Data/Aeson/Types/FromJSON.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2392,7 +2392,7 @@ instance FromJSONKey URI.URI where
23922392
fromJSONKey = FromJSONKeyTextParser parseURI
23932393

23942394
parseURI :: Text -> Parser URI.URI
2395-
parseURI t = case URI.parseURI (T.unpack t) of
2395+
parseURI t = case URI.parseURIReference (T.unpack t) of
23962396
Nothing -> fail "Invalid URI"
23972397
Just x -> return x
23982398

0 commit comments

Comments
 (0)