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.
string_int_pair.h File Reference
#include "typedefs.h"
#include "memory_allocations.h"
#include "grassroots_util_library.h"
#include "jansson.h"
Include dependency graph for string_int_pair.h:

Go to the source code of this file.

Data Structures

struct  StringIntPair
 A datatype for holding a key-value pair where the key is a c-style string and the value is an unsigned integer. More...
 
struct  StringIntPairArray
 A datatype for storing a set of StringIntPairs. More...
 

Functions

json_t * GetStringIntPairsAsResourceJSON (const StringIntPairArray *pairs_p, const char *const protocol_s)
 Get the JSON fragment representing a StringIntPairArray. More...
 
json_t * GetStringIntPairAsResourceJSON (const StringIntPair *pair_p, const char *const protocol_s)
 Get the JSON fragment representing a StringIntPair. More...
 

Function Documentation

◆ GetStringIntPairsAsResourceJSON()

json_t* GetStringIntPairsAsResourceJSON ( const StringIntPairArray pairs_p,
const char *const  protocol_s 
)

Get the JSON fragment representing a StringIntPairArray.

This will call GetStringIntPairAsResourceJSON for each item in the array.

Parameters
pairs_pThe StringIntPairArray to get the JSON fragment for.
protocol_sThe Protocol for the Resource.
Returns
The JSON fragment or NULL upon error.
See also
PROTOCOL_IRODS_S
PROTOCOL_HTTP_S
PROTOCOL_HTTPS_S
PROTOCOL_FILE_S
PROTOCOL_INLINE_S
GetStringIntPairAsResourceJSON

◆ GetStringIntPairAsResourceJSON()

json_t* GetStringIntPairAsResourceJSON ( const StringIntPair pair_p,
const char *const  protocol_s 
)

Get the JSON fragment representing a StringIntPair.

Parameters
pair_pThe StringIntPairArray to get the JSON fragment for.
protocol_sThe Protocol for the Resource.
Returns
The JSON fragment or NULL upon error.
See also
PROTOCOL_IRODS_S
PROTOCOL_HTTP_S
PROTOCOL_HTTPS_S
PROTOCOL_FILE_S
PROTOCOL_INLINE_S