Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
shamrock::solvergraph::JsonDeserializable Concept Reference

Concept for types that can be registered for polymorphic JSON deserialization. More...

#include <shamsolvergraph/include/shamsolvergraph/JsonSerializable.hpp>

Concept definition

template<typename T>
concept shamrock::solvergraph::JsonDeserializable = std::derived_from<T, JsonSerializable> && requires(const nlohmann::json &j) {
{ T::from_json(j) } -> std::same_as<T>;
}
Concept for types that can be registered for polymorphic JSON deserialization.

Detailed Description

Concept for types that can be registered for polymorphic JSON deserialization.

Requires that T derives from JsonSerializable and provides a static T::from_json(const nlohmann::json &) that returns exactly T.

Definition at line 129 of file JsonSerializable.hpp.