Tny
A simple data serializer in C
|
Tny is the main type. Every Tny-document consists of chained Tny-elements. More...
#include <tny.h>
Data Fields | |
struct _Tny * | prev |
struct _Tny * | next |
struct _Tny * | root |
TnyType | type |
size_t | docSize |
size_t * | docSizePtr |
uint32_t | size |
char * | key |
union { | |
struct _Tny * tny | |
void * ptr | |
uint64_t num | |
double flt | |
char chr | |
} | value |
Tny is the main type. Every Tny-document consists of chained Tny-elements.
size_t _Tny::docSize |
Contains the size in bytes of the value. If this is the root element, it contains the size of the document.
size_t* _Tny::docSizePtr |
Points to the docSize element of the root element where the document size is stored.
char* _Tny::key |
Contains the key of the element if the document is of type TNY_DICT.
struct _Tny* _Tny::next |
Points to the next element.
struct _Tny* _Tny::prev |
Points to the previous element.
struct _Tny* _Tny::root |
Points to the root element of the document.
uint32_t _Tny::size |
Contains the size of the value. If this is the root element, it contains the number of elements stored in the document.
Contains the type of the element. If the element is the root element, it contains the document type.
union { ... } _Tny::value |
Union to access the value depending on the type.