C Client-Side SDK
LaunchDarkly SDK
|
|
Go to the documentation of this file.
93 LDSetNumber(
struct LDJSON *
const node,
const double number);
132 const struct LDJSON *
const left,
const struct LDJSON *
const right);
214 struct LDJSON *
const collection,
struct LDJSON *
const iter);
232 LDArrayLookup(
const struct LDJSON *
const array,
const unsigned int index);
241 LDArrayPush(
struct LDJSON *
const array,
struct LDJSON *
const item);
250 LDArrayAppend(
struct LDJSON *
const prefix,
const struct LDJSON *
const suffix);
266 LDObjectLookup(
const struct LDJSON *
const object,
const char *
const key);
279 struct LDJSON *
const object,
280 const char *
const key,
281 struct LDJSON *
const item);
312 LDObjectMerge(
struct LDJSON *
const to,
const struct LDJSON *
const from);
@ LDNull
JSON Null (not JSON undefined)
Definition: json.h:19
LDBoolean LDJSONCompare(const struct LDJSON *const left, const struct LDJSON *const right)
Deep compare to check if two JSON structures are equal.
struct LDJSON * LDNewNull(void)
Constructs a JSON node of type LDJSONNull.
A custom c89 boolean type.
struct LDJSON * LDCollectionDetachIter(struct LDJSON *const collection, struct LDJSON *const iter)
Remove an iterator from a collection.
LDJSONType
Represents the type of a LaunchDarkly JSON node.
Definition: json.h:16
LDBoolean LDGetBool(const struct LDJSON *const node)
Get the value from a node of type LDJSONBool.
const char * LDGetText(const struct LDJSON *const node)
Get the value from a node of type LDJSONText.
LDBoolean LDSetNumber(struct LDJSON *const node, const double number)
Set the value of an existing Number.
struct LDJSON * LDObjectDetachKey(struct LDJSON *const object, const char *const key)
Detach the provided key from the given object. The returned value is no longer owned by the object an...
struct LDJSON * LDArrayLookup(const struct LDJSON *const array, const unsigned int index)
Lookup up the value of an index for a given array.
struct LDJSON * LDJSONDuplicate(const struct LDJSON *const json)
Duplicates an existing JSON structure. This acts as a deep copy.
LDJSONType LDJSONGetType(const struct LDJSON *const json)
Get the type of a JSON structure.
#define LD_EXPORT(x)
Used to ensure only intended symbols are exported in the binaries.
Definition: export.h:10
struct LDJSON * LDNewNumber(const double number)
Constructs a JSON node of type LDJSONumber.
@ LDArray
JSON integer indexed array.
Definition: json.h:29
@ LDText
UTF-8 JSON string.
Definition: json.h:21
double LDGetNumber(const struct LDJSON *const node)
Get the value from a node of type LDJSONNumber.
struct LDJSON * LDNewText(const char *const text)
Returns a new constructed JSON node of type LDJSONText.
struct LDJSON * LDNewBool(const LDBoolean boolean)
Constructs a JSON node of type LDJSONBool.
@ LDBool
JSON boolean (True or False)
Definition: json.h:25
struct LDJSON * LDJSONDeserialize(const char *const text)
Deserialize JSON text into a JSON structure.
LDBoolean LDArrayPush(struct LDJSON *const array, struct LDJSON *const item)
Adds an item to the end of an existing array.
struct LDJSON * LDNewArray(void)
Constructs a JSON node of type LDJSONArray.
unsigned int LDCollectionGetSize(const struct LDJSON *const collection)
Return the size of a JSON collection.
void LDObjectDeleteKey(struct LDJSON *const object, const char *const key)
Delete the provided key from the given object.
char * LDJSONSerialize(const struct LDJSON *const json)
Serialize JSON structure into JSON text.
LDBoolean LDObjectMerge(struct LDJSON *const to, const struct LDJSON *const from)
Copy keys from one object to another. If a key already exists it is overwritten by the new value.
void LDJSONFree(struct LDJSON *const json)
Frees any allocated JSON structure.
struct LDJSON * LDIterNext(const struct LDJSON *const iter)
Returns the next item in the sequence.
struct LDJSON * LDNewObject(void)
Constructs a JSON node of type LDJSONObject.
LDBoolean LDObjectSetKey(struct LDJSON *const object, const char *const key, struct LDJSON *const item)
Sets the provided key in an object to item. If the key already exists the original value is deleted.
const char * LDIterKey(const struct LDJSON *const iter)
Returns the key associated with the iterator Must be an object iterator.
@ LDObject
JSON string indexed map.
Definition: json.h:27
LDBoolean LDArrayAppend(struct LDJSON *const prefix, const struct LDJSON *const suffix)
Appends the array on the right to the array on the left.
struct LDJSON * LDGetIter(const struct LDJSON *const collection)
Allows iteration over an array. Modification of the array invalidates this iterator.
struct LDJSON * LDObjectLookup(const struct LDJSON *const object, const char *const key)
Lookup up the value of a key for a given object.
@ LDNumber
JSON number (Double or Integer)
Definition: json.h:23
Public. Configuration of exported symbols.