Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Atomic Schema: Datatypes

The Atomic Datatypes consist of some of the most commonly used Datatypes.

Note: Please visit https://atomicdata.dev/datatypes for the latest list of official Datatypes.

Slug

URL: https://atomicdata.dev/datatypes/slug

A string with a limited set of allowed characters, used in IDE / Text editor context. Only letters, numbers and dashes are allowed.

Regex: ^[a-z0-9]+(?:-[a-z0-9]+)*$

Atomic URL

URL: https://atomicdata.dev/datatypes/atomicURL

A URL that should resolve to an Atomic Resource.

URI

URL: https://atomicdata.dev/datatypes/URI

A Uniform Resource Identifier. Could be HTTP, HTTPS, or any other type of schema.

Examples:

https://example.com/1 file://home/user/file.txt mailto:user@example.com

String

URL: https://atomicdata.dev/datatypes/string

UTF-8 String, no max character count. Newlines use backslash escaped \n characters.

e.g. String time! \n Second line!

Markdown

URL: https://https://atomicdata.dev/datatypes/markdown

A markdown string, using the CommonMark syntax. UTF-8 formatted, no max character count, newlines are \n.

e.g.

# Heading Paragraph with [link](https://example.com).

Integer

URL: https://atomicdata.dev/datatypes/integer

Signed Integer, max 64 bit. Max value: 9223372036854775807

e.g. -420

Float

URL: https://atomicdata.dev/datatypes/float

A 64 bit decimal number. Max value: 1.7976931348623157e+308

e.g. -4.20

Boolean

URL: https://atomicdata.dev/datatypes/boolean

True or false, one or zero.

String serialization

true or false.

Binary serialization

Use a single bit one boolean.

1 for true, or 0 for false.

Date

ISO date without time. YYYY-MM-DD.

e.g. 1991-01-20

Timestamp

URL: https://atomicdata.dev/datatypes/timestamp

Similar to Unix Timestamp. Milliseconds since midnight UTC 1970 Jan 01 (aka the Unix Epoch). Use this for most DateTime fields. Signed 64 bit integer (instead of 32 bit in Unix systems).

e.g. 1596798919 (= 07 Aug 2020 11:15:19)

ResourceArray

URL: https://atomicdata.dev/datatypes/resourceArray

Sequential, ordered list of Atomic URIs. Serialized as a JSON array with strings.

  • e.g. ["https://example.com/1", "https://example.com/1"]

JSON

URL: https://atomicdata.dev/datatypes/json

Any valid JSON value. Can be used to store arbitrary json data.

example:

[ "thing", { "name": "thing", }, 9883 ]