1#include <auto_define_struct.h>
2#include <stdio.h>
3
4
6 float x;
7 float y;
8});
9
10int main(int argc, char *argv[]) {
12
13
15
16
17 Position value = {10, 20};
19 printf("%s\n", json);
20 ecs_os_free(json);
21
23}
FLECS_API const ecs_entity_t ecs_id(EcsDocDescription)
Component ID for EcsDocDescription.
FLECS_API char * ecs_ptr_to_json(const ecs_world_t *world, ecs_entity_t type, const void *data)
Serialize value into JSON string.
struct ecs_world_t ecs_world_t
A world is the container for all ECS data and supporting features.
int ecs_fini(ecs_world_t *world)
Delete a world.
ecs_world_t * ecs_init_w_args(int argc, char *argv[])
Create a new world with arguments.