3. Skip to content

3. Datatypes

3.1 datetime

A string of the form YYYYMMDDhhmmss (%Y%m%d%H%M%S)

3.2 timezone

The old format is (-1[0-2]|-[1-9]|[0-9]|1[0-4])[0-9]{2} ie a non-zero padded hour offset, positive or negative, followed by a minutes offset, with a range of -1200 to 1499 (inclusive. minutes logically cap at 59, but this is not a strict requirement).

The new format is -?[0-9]{4}, with a range of -2400 to 2400, non-inclusive. Absolute hour offset must be strictly less than 25, and absolute minute offset must be strictly less than 90.

3.3 float5

A float of exactly four numerical digits and a decimal place. The decimal place must not be at the start or end of the string. Value values are therefore 0.000 through 999.9 inclusive.

3.4 IP string

A string of four period-delimited octets.

These fields should not be validated for newer clients, beyond a basic presence check (an empty string is sufficient).

3.5 string[]

A string of fixed length. Trailing whitespace should be stripped before validation.

Unless otherwise specified, all characters are expected to be within the ASCII printable range (20h to 7Eh, inclusive).

3.6 int

An integer, represented in JSON as a string. Ranges, if specified, are inclusive. Constants used in this document are:

Constant Value
UINT_MAX 4294967295
USHORT_MAX 65535

3.7 nearfull

The word nearfull is used to describe both the actual nearfull value itself (unsigned 16 bit), and the combined nearfull value (unsigned 32 bit). When referred to as a datatype in this document, the latter format is what this refers to.

15 bytes1 byte16 bytesReserved(set to 0)BillingflagNearfull

The nearfull value is stored in the lowest 16 bits of the value, followed by the billing flag (a single bit), then 15 reserved bits.

3.8 signature

Hexadecimal string representing the signature of a value. This string should never be longer than 256 character (128 bytes, in hexadecimal).

3.9 history

History strings follow the format %4d%2d/%d:%4d%2d/%d:%4d%2d/%d. For example:

200912/16:201001/32:201002/64

This reads as:

2009, 12th month: 16 plays
2010, 1st month: 32 plays
2010, 2nd month: 64 plays

Exactly three months are specified, and the latest month comes last.