Function ecs_iter_to_json

Synopsis

#include <include/flecs/addons/json.h>

FLECS_API char * ecs_iter_to_json(const ecs_world_t *world, ecs_iter_t *iter, const ecs_iter_to_json_desc_t *desc)

Description

Serialize iterator into JSON string. This operation will iterate the contents of the iterator and serialize them to JSON. The function acccepts iterators from any source.

Parameters

world - The world.

iter - The iterator to serialize to JSON.

Returns
A JSON string with the serialized iterator data, or NULL if failed.

Mentioned in

Source

Line 241 in include/flecs/addons/json.h.