1#include <auto_define_enum.h>
2#include <stdio.h>
3
4
6 Red, Black, White, StainlessSteel
7});
8
10 const char *brand;
11 Color color;
12 float speed;
13});
14
15int main(int argc, char *argv[]) {
17
18
19
22
23
24 Car value = {"Delorean", StainlessSteel, 1.21f};
26 printf("%s\n", json);
27 ecs_os_free(json);
28
30}
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.