if (!JB_ISEMPTY(val))
{
- int r;
- JsonbIterator *it = JsonbIteratorInit(VARDATA(val));
+ JsonbIterator *it = JsonbIteratorInit(VARDATA(val));
JsonbValue v;
+ int r;
while((r = JsonbIteratorGet(&it, &v, false)) != 0)
{
check_stack_depth();
/*
- * Encode all possible states by one integer. That's possible because enum
- * members of JsonbIterator->state uses different bits than
- * JB_FLAG_ARRAY/JB_FLAG_OBJECT. See definition of JsonbIterator
+ * Encode all possible states by one integer. This is possible because
+ * enum members of JsonbIterator->state use different bits than
+ * JB_FLAG_ARRAY/JB_FLAG_OBJECT. See definition of JsonbIterator
*/
-
switch ((*it)->type | (*it)->state)
{
case JB_FLAG_ARRAY | jbi_start: