1ASON VALUES(3) User Manuals ASON VALUES(3)
2
3
4
6 ASON_EMPTY, ASON_NULL, ASON_UNIVERSE, ASON_WILD, ASON_OBJ_ANY,
7 ASON_TRUE, ASON_FALSE - Predefined basic ASON value constants
8
10 #include <ason/ason.h>
11
12 ason_t * const ASON_EMPTY;
13 ason_t * const ASON_NULL;
14 ason_t * const ASON_UNIVERSE;
15 ason_t * const ASON_WILD;
16 ason_t * const ASON_OBJ_ANY;
17 ason_t * const ASON_TRUE;
18 ason_t * const ASON_FALSE;
19
20 typedef enum {
21 ASON_TYPE_NUMERIC,
22 ASON_TYPE_EMPTY,
23 ASON_TYPE_NULL,
24 ASON_TYPE_UNION,
25 ASON_TYPE_INTERSECT,
26 ASON_TYPE_OBJECT,
27 ASON_TYPE_UOBJECT,
28 ASON_TYPE_LIST,
29 ASON_TYPE_JOIN,
30 ASON_TYPE_COMP,
31 ASON_TYPE_STRING,
32 ASON_TYPE_TRUE,
33 ASON_TYPE_FALSE,
34 ASON_TYPE_REPR,
35 ASON_TYPE_EQUAL,
36 } ason_type_t;
37
39 Constants
40 libason defines several constants for commonly-needed values.
41
42 ASON_TRUE, ASON_FALSE and ASON_NULL describe the JSON true, false and
43 null values respectively.
44
45 ASON_EMPTY, ASON_UNIVERSE and ASON_WILD describe the empty ASON value,
46 the ASON universe value and ASON wild value respectively.
47
48 ASON_OBJ_ANY describes a universal object with no keys.
49
50 Note that ason_destroy(3) has no effect on these ASON constants.
51
52 Types
53 libason defines the ason_type_t enum for identifying types of ASON val‐
54 ues. ASON_TYPE_NUMERIC, and ASON_TYPE_STRING are for values which are
55 constant numerical or string values respectively.
56
57 ASON_TYPE_EMPTY, ASON_TYPE_NULL, ASON_TYPE_TRUE, and ASON_TYPE_FALSE
58 are the types of the empty value, and the JSON constants "true",
59 "false", and "null".
60
61 ASON_TYPE_UNION, ASON_TYPE_INTERSECT, ASON_TYPE_COMP, and
62 ASON_TYPE_JOIN are types of values which are unions, intersections,
63 complementations, or ASON joins of other values. Note that libason typ‐
64 ically reduces values to simplest form, which should cause intersec‐
65 tions and joins to be eliminated. Thus libason functions should not
66 return those types when inspecting values.
67
68 ASON_TYPE_OBJECT and ASON_TYPE_UOBJECT are the types of normal and uni‐
69 versal objects.
70
71 ASON_TYPE_LIST is the type of list values.
72
73 ASON_TYPE_REPR, and ASON_TYPE_EQUAL are the types of statements check‐
74 ing for equality or representation between other values. Note that
75 libason will usually solve such expressions as soon as they are parsed,
76 so you will likely observe a simple true or false value rather than
77 either of these types.
78
79
81 ason(3) ason_read(3) ason_destroy(3)
82
84 Casey Dahlin <casey.dahlin@gmail.com>
85
86
87
88
89Linux JANUARY 2014 ASON VALUES(3)