Xentara v2.0.4
User Manual
Common JSON Values

The Xentara model and configuration files use specially formatted JSON strings for common types of entries in JSON files. These formats are described here.

JSON Format for Time Stamps

Time stamps in Xentara JSON files are formatted formatted according to RFC 3339. Examples of valid time stamp strings include the following:

  • "2012-12-24T11:25:45+01:00"
  • "2008-08-16 21:15:22-05:00"
  • "2022-06-01 18:15:03.254016+05:45"
  • "1970-00-00T00:00:00Z"

JSON Format for Time Intervals

Time stamps in Xentara JSON files are formatted as strings. The string must contain a number, followed by the time units. The number can contain decimals.

The supported units are:

String Units
ns nanoseconds
ms milliseconds
µs (or us) microseconds
s second
m minutes
h hours

If the time span is 0, then the units can be omitted. A time stamp of 0 can simply be written as "0" (in quotes).

Examples of valid time interval strings include the following:

  • "20µs"
  • "1s"
  • "0.5s"
  • "500ms"
  • "3.5h"
  • "0"

JSON Format for Network Addresses

Network adresses in Xentara JSON files are represented as strings similar to the host and port number in a URL. Xentara supports the following host name formats:

Type Format Example
Host name "host name" "device-1.local"
Host name with port number "host name:port number" "device-1.local:18080"
IPv4 address "IPv4 address" "192.168.1.122"
IPv4 address with port number "IPv4 address:port number" "192.168.1.122:18080"
IPv6 address "IPv6 address" "fe80::1ff:fe23:4567:890a"
IPv6 address with port number "[IPv6 address]:port number" "[fe80::1ff:fe23:4567:890a]:18080"

If you do not specify a port number, the standard port number for the corresponding protocol will be used. Please note that some protocols do not have a standard port number, in which case only the variants that include a port number are allowed.

JSON Format for Binary Data

Binary data is represented in the configuration file as a series of hexadecimal byte values. The individual bytes can optionally be separated using spaces or colons. Hexadecimal digits can be upper or lower case, or a mixture.

Examples of valid representations of the byte sequence bd 54 03 2e e6 2c 50 43 include the following:

  • "bd:54:03:2e:e6:2c:50:43"
  • "BD:54:03:2E:E6:2C:50:43"
  • "bd 54 03 2e e6 2c 50 43"
  • "BD 54 03 2E E6 2C 50 43"
  • "bd54032ee62c5043"
  • "BD54032EE62C5043"
  • "Bd:54:03:2e:E6:2c:50:43"