ason_values - Man Page

Predefined basic ASON value constants

Synopsis

#include <ason/ason.h>

ason_t * const ASON_EMPTY;
ason_t * const ASON_NULL;
ason_t * const ASON_UNIVERSE;
ason_t * const ASON_WILD;
ason_t * const ASON_OBJ_ANY;
ason_t * const ASON_TRUE;
ason_t * const ASON_FALSE;

typedef enum {
ASON_TYPE_NUMERIC,
ASON_TYPE_EMPTY,
ASON_TYPE_NULL,
ASON_TYPE_UNION,
ASON_TYPE_INTERSECT,
ASON_TYPE_OBJECT,
ASON_TYPE_UOBJECT,
ASON_TYPE_LIST,
ASON_TYPE_JOIN,
ASON_TYPE_COMP,
ASON_TYPE_STRING,
ASON_TYPE_TRUE,
ASON_TYPE_FALSE,
ASON_TYPE_REPR,
ASON_TYPE_EQUAL,
} ason_type_t;

Description

Constants

libason defines several constants for commonly-needed values.

ASON_TRUE, ASON_FALSE and ASON_NULL describe the JSON true, false and null values respectively.

ASON_EMPTY, ASON_UNIVERSE and ASON_WILD describe the empty ASON value, the ASON universe value and ASON wild value respectively.

ASON_OBJ_ANY describes a universal object with no keys.

Note that ason_destroy(3) has no effect on these ASON constants.

Types

libason defines the ason_type_t enum for identifying types of ASON values. ASON_TYPE_NUMERIC, and ASON_TYPE_STRING are for values which are constant numerical or string values respectively.

ASON_TYPE_EMPTY, ASON_TYPE_NULL, ASON_TYPE_TRUE, and ASON_TYPE_FALSE are the types of the empty value, and the JSON constants "true", "false", and "null".

ASON_TYPE_UNION, ASON_TYPE_INTERSECT, ASON_TYPE_COMP, and ASON_TYPE_JOIN are types of values which are unions, intersections, complementations, or ASON joins of other values. Note that libason typically reduces values to simplest form, which should cause intersections and joins to be eliminated. Thus libason functions should not return those types when inspecting values.

ASON_TYPE_OBJECT and ASON_TYPE_UOBJECT are the types of normal and universal objects.

ASON_TYPE_LIST is the type of list values.

ASON_TYPE_REPR, and ASON_TYPE_EQUAL are the types of statements checking for equality or representation between other values. Note that libason will usually solve such expressions as soon as they are parsed, so you will likely observe a simple true or false value rather than either of these types.

See Also

ason(3) ason_read(3) ason_destroy(3)

Author

Casey Dahlin <casey.dahlin@gmail.com>

Referenced By

ason(3), ason_asprint(3), ason_destroy(3), ason_inspect(3), ason_iterators(3), ason_read(3).

JANUARY 2014 Linux User Manuals