129 ecs_strbuf_t *buf_out);
159 ecs_strbuf_t *buf_out);
188 ecs_strbuf_t *buf_out);
206#define ECS_ENTITY_TO_JSON_INIT (ecs_entity_to_json_desc_t){true, false,\
207 false, false, false, false, false, true, false, false, false, false }
237 ecs_strbuf_t *buf_out,
260#define ECS_ITER_TO_JSON_INIT (ecs_iter_to_json_desc_t){\
261 .serialize_term_ids = true, \
262 .serialize_ids = true, \
263 .serialize_sources = true, \
264 .serialize_variables = true, \
265 .serialize_is_set = true, \
266 .serialize_values = true, \
267 .serialize_entities = true, \
268 .serialize_entity_labels = false, \
269 .serialize_entity_ids = false, \
270 .serialize_entity_names = false, \
271 .serialize_variable_labels = false, \
272 .serialize_variable_ids = false, \
273 .serialize_colors = false, \
274 .measure_eval_duration = false, \
275 .serialize_type_info = false, \
276 .serialize_table = false \
305 ecs_strbuf_t *buf_out,
310 bool serialize_builtin;
311 bool serialize_modules;
344 ecs_strbuf_t *buf_out,
FLECS_API const char * ecs_entity_from_json(ecs_world_t *world, ecs_entity_t entity, const char *json, const ecs_from_json_desc_t *desc)
Parse JSON object with multiple component values into entity.
FLECS_API const char * ecs_world_from_json(ecs_world_t *world, const char *json, const ecs_from_json_desc_t *desc)
Parse JSON object with multiple entities into the world.
FLECS_API int ecs_type_info_to_json_buf(const ecs_world_t *world, ecs_entity_t type, ecs_strbuf_t *buf_out)
Serialize type info into JSON string buffer.
FLECS_API int ecs_ptr_to_json_buf(const ecs_world_t *world, ecs_entity_t type, const void *data, ecs_strbuf_t *buf_out)
Serialize value into JSON string buffer.
FLECS_API char * ecs_entity_to_json(const ecs_world_t *world, ecs_entity_t entity, const ecs_entity_to_json_desc_t *desc)
Serialize entity into JSON string.
FLECS_API char * ecs_ptr_to_json(const ecs_world_t *world, ecs_entity_t type, const void *data)
Serialize value into JSON string.
FLECS_API char * ecs_type_info_to_json(const ecs_world_t *world, ecs_entity_t type)
Serialize type info to JSON.
FLECS_API int ecs_world_to_json_buf(ecs_world_t *world, ecs_strbuf_t *buf_out, const ecs_world_to_json_desc_t *desc)
Serialize world into JSON string buffer.
FLECS_API char * ecs_iter_to_json(const ecs_world_t *world, ecs_iter_t *iter, const ecs_iter_to_json_desc_t *desc)
Serialize iterator into JSON string.
FLECS_API char * ecs_world_to_json(ecs_world_t *world, const ecs_world_to_json_desc_t *desc)
Serialize world into JSON string.
FLECS_API int ecs_iter_to_json_buf(const ecs_world_t *world, ecs_iter_t *iter, ecs_strbuf_t *buf_out, const ecs_iter_to_json_desc_t *desc)
Serialize iterator into JSON string buffer.
FLECS_API const char * ecs_ptr_from_json(const ecs_world_t *world, ecs_entity_t type, void *ptr, const char *json, const ecs_from_json_desc_t *desc)
Parse JSON string into value.
FLECS_API int ecs_array_to_json_buf(const ecs_world_t *world, ecs_entity_t type, const void *data, int32_t count, ecs_strbuf_t *buf_out)
Serialize array into JSON string buffer.
FLECS_API char * ecs_array_to_json(const ecs_world_t *world, ecs_entity_t type, const void *data, int32_t count)
Serialize array into JSON string.
FLECS_API int ecs_entity_to_json_buf(const ecs_world_t *world, ecs_entity_t entity, ecs_strbuf_t *buf_out, const ecs_entity_to_json_desc_t *desc)
Serialize entity into JSON string buffer.
ecs_id_t ecs_entity_t
An entity identifier.
struct ecs_world_t ecs_world_t
A world is the container for all ECS data and supporting features.
Used with ecs_iter_to_json.
bool serialize_values
Serialize component values.
bool serialize_label
Serialize doc name.
bool serialize_brief
Serialize brief doc description.
bool serialize_hidden
Serialize ids hidden by override.
bool serialize_meta_ids
Serialize 'meta' ids (Name, ChildOf, etc)
bool serialize_path
Serialize full pathname.
bool serialize_private
Serialize private components.
bool serialize_id_labels
Serialize labels of (component) ids.
bool serialize_link
Serialize doc link (URL)
bool serialize_type_info
Serialize type info (requires serialize_values)
bool serialize_color
Serialize doc color.
bool serialize_base
Serialize base components.
Used with ecs_ptr_from_json, ecs_entity_from_json.
Used with ecs_iter_to_json.
bool serialize_ids
Serialize actual (matched) component ids.
bool measure_eval_duration
Serialize evaluation duration.
bool serialize_variable_ids
Serialize numerical ids for variables.
bool serialize_sources
Serialize sources.
bool serialize_colors
Serialize doc color for entities.
bool serialize_entities
Serialize entities (for This terms)
bool serialize_variables
Serialize variables.
bool serialize_entity_names
Serialize names (not paths) for entities.
bool serialize_variable_labels
Serialize doc name for variables.
bool serialize_table
Serialize entire table vs.
bool serialize_term_ids
Serialize term (query) component ids.
bool serialize_entity_labels
Serialize doc name for entities.
bool serialize_values
Serialize component values.
bool serialize_type_info
Serialize type information.
bool serialize_entity_ids
Serialize numerical ids for entities.
bool serialize_is_set
Serialize is_set (for optional terms)
Used with ecs_iter_to_json.