Pharos 0.7.23
Modern Web Framework & Web App Hosting Service.
Loading...
Searching...
No Matches
yyjson_mut_arr_iter Struct Reference

#include <yyjson.h>

Data Fields

size_t idx
size_t max
yyjson_mut_valcur
yyjson_mut_valpre
yyjson_mut_valarr

Detailed Description

A mutable JSON array iterator.

Warning
You should not modify the array while iterating over it, but you can use yyjson_mut_arr_iter_remove() to remove current value.

Example

while ((val = yyjson_mut_arr_iter_next(&iter))) {
your_func(val);
if (your_val_is_unused(val)) {
}
}
yyjson_mut_val * arr
Definition yyjson.h:2922
yyjson_api_inline yyjson_mut_val * yyjson_mut_arr_iter_remove(yyjson_mut_arr_iter *iter)
Definition yyjson.h:6387
yyjson_api_inline yyjson_mut_val * yyjson_mut_arr_iter_next(yyjson_mut_arr_iter *iter)
Definition yyjson.h:6375
yyjson_api_inline yyjson_mut_arr_iter yyjson_mut_arr_iter_with(yyjson_mut_val *arr)
Definition yyjson.h:6364

Definition at line 2917 of file yyjson.h.

Field Documentation

◆ arr

yyjson_mut_val* yyjson_mut_arr_iter::arr

the array being iterated

Definition at line 2922 of file yyjson.h.

◆ cur

yyjson_mut_val* yyjson_mut_arr_iter::cur

current value

Definition at line 2920 of file yyjson.h.

◆ idx

size_t yyjson_mut_arr_iter::idx

next value's index

Definition at line 2918 of file yyjson.h.

◆ max

size_t yyjson_mut_arr_iter::max

maximum index (arr.size)

Definition at line 2919 of file yyjson.h.

◆ pre

yyjson_mut_val* yyjson_mut_arr_iter::pre

previous value

Definition at line 2921 of file yyjson.h.


The documentation for this struct was generated from the following file: