Jadpo is experimental and not ready for production. These docs follow the compiler's main branch as of 5 Nov 2026. What's built · Install 0.3.0
jadpo
ReferenceWeb and network

LanguageValues and typesStandard typesWeb and network

IpAddress

On this page

An IPv4 or IPv6 address: 192.0.2.1, 2001:db8::1.

Use it for an address you allow or block. For a range of addresses, use Cidr. For a name, use Hostname.

Shape

One value, with no fields to fill in. As text it reads 2001:db8::1.

Example

example
IpAddress("192.0.2.1")

text.parse(raw, as: IpAddress) reads one from text that comes from outside. Text that isn't one at all fails malformed, such as 192.0.2 or example.com.

Good to know

  • When it identifies a person, mark the field that holds it personal: PersonalData.online.
  • == tells you whether two are the same. < and list.sort_by don't take it.

In JSON

A string, in a request, a response or json.write:

json
"192.0.2.1""2001:db8::1"

Details

Text form, storage, how it is shown, and operations

IpAddress is in the group Web and network, and has been in Jadpo since 0.1.0.

Text form

text.from writes one standard text form, the same form text.parse reads back: 192.0.2.1 and 2001:db8::1.

How it is stored

It is stored in one column named for the field, of type text. 2001:db8::1 is stored as '2001:db8::1'.

How it is shown to people

text.format(value, locale:) shows it to people in their locale.

With locale: Locale.en_gb:

Value Shown
192.0.2.1 192.0.2.1
2001:db8::1 2001:db8::1

Operations

  • web.cidr_contains(range: Cidr, address: IpAddress) -> Bool: Whether address is inside range. An IPv4 address is never inside an IPv6 range, nor the other way round.

It also takes text.parse, text.from, text.format, json.read, json.write and ==. How every standard type behaves says how they work.

Markdown for agents: /docs/types/type-ip-address.md.Built from Jadpo main at aee2e8f.