This module provides preset schema prefixes and helpers for handling prefix contexts.
This type enumerates predefined schema prefixes.
Dict String String
The Context type alias is a dictionary, mapping prefix strings to schema uris.
string : Prefix -> String
Return the Prefix as a String.
uri : Prefix -> String
Return the associated uri for a Prefix.
context : List Prefix -> Context
Assemble a context from a list of prefixes.
uriFromContext : Context -> String -> String
Look up a prefix in the provided context and return the associated url, defaulting to the entire url.
fromContext : Context -> String -> List String
Get a list of alternatives to use as prefix for a specified schema url, falling back to the entire url, from the provided context.
encodeContext : Context -> Json.Encode.Value
Encode a Context dictionary into a json value.
decodeContext : Json.Decode.Decoder Context
Decode the @context
json field into a Context dictionary.