Currently StringOrURI uses some not very nice functions for parsing and getting at the possible values.
Prisms would be better.
Also note that the current implementation is not quite right: we interpret anything that does not parse as a URI as an arbitrary string value, but according to https://tools.ietf.org/html/rfc7519#section-2, any value that contains a ':' MUST be a URI. So this should be fixed at the same time.
Currently StringOrURI uses some not very nice functions for parsing and getting at the possible values. Prisms would be better.
Also note that the current implementation is not quite right: we interpret anything that does not parse as a URI as an arbitrary string value, but according to https://tools.ietf.org/html/rfc7519#section-2, any value that contains a
':'
MUST be a URI. So this should be fixed at the same time.