cjson · Section 3
cjson_dictionary_next
NAME
cjson_dictionary_next - step a dictionary cursor onto the next member
LIBRARY
C Collections (libccollections, -lccollections)
SYNOPSIS
#include <ccollections/cjson.h> bool cjson_dictionary_next(cjson_dictionary_iter *it);
DESCRIPTION
Moves the cursor it, which cjson_dictionary_first(3) filled, to the member that comes after the current one in insertion order. After a call that returns true, it->key and it->value describe that member. cjson_dictionary_first(3) describes the order, how long it->key lives and which changes the cursor survives.
PARAMETERS
it A cursor that cjson_dictionary_first(3) filled.
RETURN VALUE
true when it stands on the next member. false when the previous call gave the last member, and on every call after that, and the function then sets it->key and it->value to NULL. Also false when it is NULL.
NOTES
The cursor survives an insert, the replacement of any value and the removal of any member except the one this call is about to read. cjson_dictionary_first(3) gives the exact rule.