ASON_VALUES(3)
π ASON VALUES π
okay bestie, so this is the ASON Values page from section 3 of the User Manuals, and it's literally the cheat sheet for all the cute little constants and type enums that libason hands you for free. no cap, it's giving "starter pack" energy π
β¨ NAME β¨
ASON_EMPTY, ASON_NULL, ASON_UNIVERSE, ASON_WILD, ASON_OBJ_ANY, ASON_TRUE, ASON_FALSE β Predefined basic ASON value constants π¦
β¨ SYNOPSIS β¨
first things first, you gotta pull in the header, periodt:
#include <ason/ason.h>
and here are the constants, all of them, looking iconic:
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;
and the enum that tells you what a value is, because vibes alone aren't enough:
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. it's giving "we already did the work for you, bestie" π
ASON_TRUE,ASON_FALSEandASON_NULLβ these describe the JSONtrue,falseandnullvalues respectively. yes, the classics.ASON_EMPTY,ASON_UNIVERSEandASON_WILDβ these describe the empty ASON value, the ASON universe value and ASON wild value respectively.ASON_OBJ_ANYβ describes a universal object with no keys. no keys, no problems, main character energy fr.
okay important one: ason_destroy(3) has no effect on these ASON constants. so don't be out here trying to destroy them, they're built different π₯
π¦ Types π¦
libason defines the ason_type_t enum for identifying types of ASON values. think of it like a vibe check for your data π
ASON_TYPE_NUMERIC, andASON_TYPE_STRINGare for values which are constant numerical or string values respectively.ASON_TYPE_EMPTY,ASON_TYPE_NULL,ASON_TYPE_TRUE, andASON_TYPE_FALSEare the types of the empty value, and the JSON constants"true","false", and"null".ASON_TYPE_UNION,ASON_TYPE_INTERSECT,ASON_TYPE_COMP, andASON_TYPE_JOINare types of values which are unions, intersections, complementations, or ASON joins of other values.
heads up bestie:libasontypically reduces values to simplest form, which should cause intersections and joins to be eliminated. solibasonfunctions should not return those types when inspecting values. it's giving "you'll basically never see these, don't count on it" π
ASON_TYPE_OBJECTandASON_TYPE_UOBJECTare the types of normal and universal objects.ASON_TYPE_LISTis the type of list values.ASON_TYPE_REPR, andASON_TYPE_EQUALare the types of statements checking for equality or representation between other values.
another lil reality check:libasonwill usually solve such expressions as soon as they are parsed, so you will likely observe a simpletrueorfalsevalue rather than either of these types. the way it just solves itself immediately... icon behavior πβ¨
β¨ SEE ALSO β¨
ason(3) ason_read(3) ason_destroy(3) β go read those too, they're part of the lore ππ«Ά
β¨ AUTHOR β¨
Casey Dahlin <casey.dahlin@gmail.com> β thank you for your service king/queen/monarch ππ
and that's the whole page, babe. this one shipped on Linux, dated JANUARY 2014, and it's the ASON VALUES(3) page from the User Manuals. slay, stay safe, and remember: don't ason_destroy a constant ππβ¨
π¦ where this page comes from
- fedora 43: libason-devel 0.1.2-27.fc43 Β· GPL-3.0-or-later
- fedora 43: libason-devel 0.1.2-27.fc43 Β· GPL-3.0-or-later
- fedora 44: libason-devel 0.1.2-28.fc44 Β· GPL-3.0-or-later
- fedora 44: libason-devel 0.1.2-28.fc44 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms