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, preferably a URL (i.e. an URI that can be fetched). Could be HTTP, HTTPS, or any other type of schema.

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

Number with a comma. Max value: 9223372036854775807

e.g. -420

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. Note that other types of arrays are not included in this spec, but can be perfectly valid.

(Discussion)

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