Flecs v3.1
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches

Functions for serializing to/from JSON. More...

Typedefs

using flecs::entity_to_json_desc_t = ecs_entity_to_json_desc_t
 
using flecs::iter_to_json_desc_t = ecs_iter_to_json_desc_t
 

Functions

const char * flecs::entity::from_json (const char *json)
 Deserialize entity to JSON. More...
 
flecs::string flecs::entity_view::to_json (const flecs::entity_to_json_desc_t *desc=nullptr)
 Serialize entity to JSON. More...
 
flecs::string flecs::iter::to_json (flecs::iter_to_json_desc_t *desc=nullptr)
 Serialize iterator result to JSON. More...
 
flecs::string flecs::world::to_json (flecs::entity_t tid, const void *value)
 Serialize untyped value to JSON. More...
 
template<typename T >
flecs::string flecs::world::to_json (const T *value)
 Serialize value to JSON. More...
 
flecs::string flecs::world::to_json ()
 Serialize world to JSON. More...
 
template<typename T >
const char * flecs::world::from_json (flecs::entity_t tid, void *value, const char *json)
 Deserialize value from JSON. More...
 
template<typename T >
const char * flecs::world::from_json (T *value, const char *json)
 Deserialize value from JSON. More...
 

Detailed Description

Functions for serializing to/from JSON.

Typedef Documentation

◆ entity_to_json_desc_t

Definition at line 18 of file decl.hpp.

◆ iter_to_json_desc_t

Definition at line 19 of file decl.hpp.

Function Documentation

◆ from_json() [1/3]

const char * from_json ( const char *  json)

Deserialize entity to JSON.

Definition at line 7 of file entity.inl.

◆ from_json() [2/3]

template<typename T >
const char * from_json ( flecs::entity_t  tid,
void *  value,
const char *  json 
)

Deserialize value from JSON.

Definition at line 42 of file world.inl.

◆ from_json() [3/3]

template<typename T >
const char * from_json ( T *  value,
const char *  json 
)

Deserialize value from JSON.

Definition at line 52 of file world.inl.

◆ to_json() [1/5]

flecs::string to_json ( )

Serialize world to JSON.

Definition at line 32 of file world.inl.

◆ to_json() [2/5]

flecs::string to_json ( const flecs::entity_to_json_desc_t desc = nullptr)

Serialize entity to JSON.

Definition at line 11 of file entity_view.inl.

◆ to_json() [3/5]

template<typename T >
flecs::string to_json ( const T *  value)

Serialize value to JSON.

Definition at line 22 of file world.inl.

◆ to_json() [4/5]

flecs::string to_json ( flecs::entity_t  tid,
const void *  value 
)

Serialize untyped value to JSON.

Definition at line 11 of file world.inl.

◆ to_json() [5/5]

flecs::string to_json ( flecs::iter_to_json_desc_t desc = nullptr)

Serialize iterator result to JSON.

Definition at line 11 of file iterable.inl.