|
FERS 1.0.0
The Flexible Extensible Radar Simulator
|
Provides functions to serialize and deserialize the simulation world to/from JSON. More...
#include <nlohmann/json.hpp>#include <random>
Include dependency graph for json_serializer.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Namespaces | |
| namespace | core |
| namespace | serial |
Functions | |
| nlohmann::json | serial::world_to_json (const core::World &world) |
| Serializes the entire simulation world into a nlohmann::json object. | |
| void | serial::json_to_world (const nlohmann::json &j, core::World &world, std::mt19937 &masterSeeder) |
| Deserializes a nlohmann::json object and reconstructs the simulation world. | |
Provides functions to serialize and deserialize the simulation world to/from JSON.
This module is the primary data interchange layer between the C++ core engine and the user interface. JSON was chosen as the format for its native support in web technologies (like the React/TypeScript frontend), its human-readability, and its lightweight nature. This serializer defines the contract for how C++ simulation objects are represented in JSON, enabling the UI to read, modify, and write back the entire simulation state.
Definition in file json_serializer.h.