Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
|
A datatype for storing a value as a string along with the datatype to convert it to. More...
#include <json_util.h>
Public Member Functions | |
FieldNode * | AllocateFieldNode (const char *name_s, const MEM_FLAG mf, json_type field_type) |
Allocate a FieldNode that points to the given json object. More... | |
void | FreeFieldNode (ListItem *node_p) |
Free a FieldNode. More... | |
Public Member Functions inherited from StringListNode | |
StringListNode * | AllocateStringListNode (const char *const str_p, const MEM_FLAG mem_flag) |
Create a new StringListNode. More... | |
bool | InitStringListNode (StringListNode *node_p, const char *const value_s, const MEM_FLAG mem_flag) |
Initialise a StringListNode. More... | |
void | FreeStringListNode (ListItem *const node_p) |
Free a StringListNode. More... | |
void | ClearStringListNode (StringListNode *node_p) |
Clear a StringListNode by deleting its sln_string_s value as appropriate. More... | |
LinkedList * | AllocateStringLinkedList (void) |
Create a LinkedList designed to hold StringListNodes. More... | |
LinkedList * | CopyStringLinkedList (const LinkedList *const src_p) |
Make a copy of a LinkedList of StringListNodes. More... | |
char * | GetStringLinkedListAsString (const LinkedList *const src_p) |
Get a new string that is the concatenation of all of the entries on a StringLinkedList. More... | |
bool | AddStringToStringLinkedList (LinkedList *list_p, const char *const str_p, const MEM_FLAG mem_flag) |
Create and add a new StringListNode to the tail of a LinkedList. More... | |
LinkedList * | GetUUIDSList (const char *ids_s) |
Create a LinkedList of StringListNodes with each entry being a uuid. More... | |
Data Fields | |
StringListNode | fn_base_node |
The base node. More... | |
json_type | fn_type |
This defines the type of the data. More... | |
Data Fields inherited from StringListNode | |
ListItem | sln_node |
The ListNode. More... | |
char * | sln_string_s |
The string value. More... | |
MEM_FLAG | sln_string_flag |
How the memory for the string is stored and freed. More... | |
Data Fields inherited from ListItem | |
ListItem * | ln_prev_p |
A pointer to the previous ListItem. More... | |
ListItem * | ln_next_p |
A pointer to the next ListItem. More... | |
A datatype for storing a value as a string along with the datatype to convert it to.
This is used when reading in data where all the values are stored as strings regardless of their actual datatype e.g.
"score": "10"
where score is actually an integer. This datatype is to allow the conversion back to the correct type.
Allocate a FieldNode that points to the given json object.
name_s | The json object for the newly to point to. |
mf | The MEM_FLAG used to store the name of this FieldNode. |
field_type | The type of JSON object that this FieldNode will store. |
NULL
upon error.StringListNode fn_base_node |
The base node.
json_type fn_type |
This defines the type of the data.