jsonschema.uri

RFC 3986 URI handling: parsing into components, reference resolution against a base URI (§5.2), and fragment splitting. Used for $id, $ref, $anchor, and $dynamicRef base-URI resolution.

Members

Functions

parseUri
Uri parseUri(string s)

Parse a URI reference into components (regex from RFC 3986 appendix B, implemented directly).

percentDecode
string percentDecode(string s)

Percent-decode a string (used on JSON Pointer fragments). Invalid escapes are left verbatim.

removeDotSegments
string removeDotSegments(string input)

Remove "." and ".." path segments (RFC 3986 §5.2.4).

resolveUri
string resolveUri(string base, string reference)

Resolve a URI reference against a base URI (RFC 3986 §5.2.2) and return the recomposed target string. The fragment of reference is preserved; the base's fragment never propagates.

splitFragment
void splitFragment(string uri, string base, string fragment)

Split a URI into its fragment-free part and the fragment ("" when none).

Structs

Uri
struct Uri

Decomposed URI reference (RFC 3986 §3). Empty-vs-absent matters for authority and query, so those carry presence flags.