LanguageValues and typesStandard typesOther with a published standard
Jurisdiction
On this page
Where a law applies: a country, or a part of one such as England.
Use it for where a rule or a licence applies. For where something is, use Country or CountrySubdivision on their own.
Shape
One of these, each with its own fields:
| Variant | Field | Type | Required? |
|---|---|---|---|
Jurisdiction.country |
country |
Country |
Yes |
Jurisdiction.subdivision |
subdivision |
CountrySubdivision |
Yes |
Example
Jurisdiction.subdivision { subdivision: CountrySubdivision.gb_eng }Good to know
- The other variant is
Jurisdiction.country { country: ... }. ==tells you whether two are the same.<andlist.sort_bydon't take it.
In JSON
An object of its variant's name, as tag, and the variant's fields, in a request, a response or json.write:
{"tag":"country","country":"GB"}{"tag":"subdivision","subdivision":"GB-ENG"}{"tag":"subdivision","subdivision":"US-CA"}
Details
Text form, storage, how it is shown, and operations
Jurisdiction is in the group Other with a published standard, and has been in Jadpo since 0.1.0.
Text form
It has no single text form, so text.from and text.parse don't take it.
How it is stored
It is stored in 3 columns, each named for the field, _ and its suffix. This is {"tag":"subdivision","subdivision":"GB-ENG"}:
| Column | Type | Holds |
|---|---|---|
<field>_kind |
text |
'subdivision' |
<field>_country |
text |
NULL::text |
<field>_subdivision |
text |
'GB-ENG' |
How it is shown to people
text.format(value, locale:) shows it to people in their locale.
With locale: Locale.en_gb:
| Value | Shown |
|---|---|
{"tag":"country","country":"GB"} |
United Kingdom |
{"tag":"subdivision","subdivision":"GB-ENG"} |
England |
{"tag":"subdivision","subdivision":"US-CA"} |
California |
Operations
It also takes text.format, json.read, json.write and ==. How every standard type behaves says how they work.
Markdown for agents: /docs/types/type-jurisdiction.md.Built from Jadpo main at aee2e8f.