![]() |
![]()
| ![]() |
![]()
NAMEJSON::Validator::URI - Uniform Resource IdentifierSYNOPSISuse JSON::Validator::URI; my $urn = JSON::Validator::URI->new('urn:uuid:ee564b8a-7a87-4125-8c96-e9f123d6766f'); my $url = JSON::Validator::URI->new('/foo'); my $url = JSON::Validator::URI->new('https://mojolicious.org'); DESCRIPTIONJSON::Validator::URI is a class for presenting both URL and URN.This class is currently EXPERIMENTAL. EXPORTED FUNCTIONSuri$uri = uri; $uri = uri $orig, $base; Returns a new JSON::Validator::URI object from $orig and $base. Both variables can be either a string or a JSON::Validator::URI object. ATTRIBUTESJSON::Validator::URI inherits all attributes from Mojo::URL and implements the following ones.nid$str = $uri->nid; Returns the NID part of a URN. Example "uuid" or "iban". nss$str = $uri->nss; Returns the NSS part of a URN. Example "6e8bc430-9c3a-11d9-9669-0800200c9a66". METHODSJSON::Validator::URI inherits all methods from Mojo::URL and implements the following ones.from_data$str = $uri->from_data($data); This method will generate a URN for $data. $data will be serialized using "encode_json" in Mojo::JSON before being used to generate an UUIDv5. This method is EXPERIMENTAL and subject to change! parseSee "parse" in Mojo::URL.to_absSee "to_abs" in Mojo::URL.to_stringSee "to_string" in Mojo::URL.to_unsafe_stringSee "to_unsafe_string" in Mojo::URL.SEE ALSOJSON::Validator.
|