7#if !defined(TETENGO_JSON_ELEMENT_H)
8#define TETENGO_JSON_ELEMENT_H
13#if defined(__cplusplus)
17#if !defined(DOCUMENTATION)
18typedef struct tetengo_json_element_tag tetengo_json_element_t;
140 size_t attribute_count,
207#if defined(__cplusplus)
int tetengo_json_element_typeName_object()
Returns the type name of object.
int tetengo_json_element_typeName_member()
Returns the type name of member.
const char * tetengo_json_element_value(const tetengo_json_element_t *p_element)
Returns the value.
void tetengo_json_element_destroy(const tetengo_json_element_t *p_element)
Destroys an element.
int tetengo_json_element_typeName_array()
Returns the type name of array.
int tetengo_json_element_typeCategory_primitive()
Returns the type category of primitive.
struct tetengo_json_element_attributeKeyValue_tag tetengo_json_element_attributeKeyValue_t
tetengo_json_element_t * tetengo_json_element_copy(const tetengo_json_element_t *p_another)
Copies an element.
int tetengo_json_element_typeName_number()
Returns the type name of number.
int tetengo_json_element_typeName_boolean()
Returns the type name of boolean.
size_t tetengo_json_element_attributeKeys(const tetengo_json_element_t *p_element, const char **p_keys)
Returns the attribute keys.
const tetengo_json_fileLocation_t * tetengo_json_element_getFileLocation(const tetengo_json_element_t *p_element)
Returns the file location.
struct tetengo_json_element_type_tag tetengo_json_element_type_t
tetengo_json_element_t * tetengo_json_element_create(const tetengo_json_element_type_t *p_type, const char *value, const tetengo_json_element_attributeKeyValue_t *p_attributes, size_t attribute_count, const tetengo_json_fileLocation_t *p_file_location)
Creates an element.
const char * tetengo_json_element_attributeValueOf(const tetengo_json_element_t *p_element, const char *key)
Returns the attribute value.
const tetengo_json_element_type_t * tetengo_json_element_type(const tetengo_json_element_t *p_element)
Returns the type.
struct tetengo_json_fileLocation_tag tetengo_json_fileLocation_t
int tetengo_json_element_typeCategory_structureOpen()
Returns the type category of opening structure.
int tetengo_json_element_typeName_null()
Returns the type name of null.
int tetengo_json_element_typeCategory_structureClose()
Returns the type category of closing structure.
int tetengo_json_element_typeName_string()
Returns the type name of string.
const char * key
Definition element.h:106
const char * value
Definition element.h:109
int category
Definition element.h:99
int name
Definition element.h:96
size_t column_index
Definition element.h:122
const char * line
Definition element.h:116
size_t line_index
Definition element.h:119