Skip to content
Flecs v4.1
entity.inl
Go to the documentation of this file.
1/**
2 * @file addons/cpp/mixins/json/entity.inl
3 * @brief JSON entity mixin.
4 */
5
6/** Deserialize an entity from JSON.
7 *
8 * @memberof flecs::entity
9 * @ingroup cpp_addons_json
10 */
11const char* from_json(const char *json) {
12 return ecs_entity_from_json(world_, id_, json, nullptr);
13}
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 an entity.
const char * from_json(const char *json)
Deserialize an entity from JSON.
Definition entity.inl:11
flecs::id_t id_
The raw ID value.
Definition decl.hpp:154
flecs::world_t * world_
World is optional, but guarantees that entity identifiers extracted from the ID are valid.
Definition decl.hpp:152