Attribute syntax

Updated: April 19, 2023

PPS objects have user-defined attributes. Attributes are listed in a PPS object after the object name.

Attribute names may consist of alphanumeric characters, underscores, and periods, but must begin with a letter or underscore. Attribute lines in a PPS object file are of the form attrname:encoding:value\n where attrname is the attribute name, and encoding defines the encoding type for value. The end of the attribute name and the end of the encoding are marked by colons (":"). Subsequent colons are ignored.

PPS doesn't interpret the encoding; it simply passes the encoding through from publisher to subscriber. Thus, publishers and subscribers are free to define their own encodings to meet their needs. The table below describes possible encoding types:

Symbol Encoding
:: Also referred to as null encoding. Simple text terminated by a linefeed.
:c: C language escape sequences, such as "\t" and "\n". Note that "\n" or "\t" in this encoding is a "\" character followed by an "n" or "t"; in a C string this would be "\\n\\t"
:b: Boolean
:n: Numeric
:b64: Base64 encoding
:json: JavaScript Object Notation encoding
An attribute's value can be any sequence of characters, except:

PPS includes some useful routines to help with encoding; see the PPS Encoding and Decoding API and PPS API reference chapters.