Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
JsonSerializable.hpp File Reference

Polymorphic JSON serialization via a type registry. More...

#include "shambase/SourceLocation.hpp"
#include "sham/format/format.hpp"
#include <nlohmann/json.hpp>
#include <source_location>
#include <unordered_map>
#include <concepts>
#include <functional>
#include <memory>
#include <stdexcept>
#include <string>
Include dependency graph for JsonSerializable.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  shamrock::solvergraph::JsonSerializable
 Base interface for types that can be serialized to and from JSON. More...
class  shamrock::solvergraph::JsonSerializable_registry
 Singleton registry mapping type names to JSON factory functions. More...

Namespaces

namespace  shamrock
 namespace for the main framework

Concepts

concept  shamrock::solvergraph::JsonDeserializable
 Concept for types that can be registered for polymorphic JSON deserialization.

Detailed Description

Polymorphic JSON serialization via a type registry.

Author
Timothée David–Cléris (tim.s.nosp@m.hamr.nosp@m.ock@p.nosp@m.roto.nosp@m.n.me)

Provides a base interface and a singleton registry so derived types can be serialized to JSON and reconstructed polymorphically from a "type" field.

Definition in file JsonSerializable.hpp.