6 #ifndef CHI_JSON_DESERIALIZER_HPP 7 #define CHI_JSON_DESERIALIZER_HPP 10 #include "chi/Support/json.hpp" 12 #include <boost/filesystem.hpp> 13 #include <boost/utility/string_view.hpp> 27 const boost::filesystem::path& fullName, GraphModule** toFill =
nullptr);
35 const nlohmann::json& input,
36 GraphFunction** toFill =
nullptr);
50 Result
jsonToGraphStruct(GraphModule& mod, boost::string_view name,
const nlohmann::json& input,
51 GraphStruct** toFill =
nullptr);
56 std::pair<std::string, std::string>
parseObjectPair(
const nlohmann::json&
object);
62 #endif // CHI_JSON_DESERIALIZER_HPP Result jsonToGraphStruct(GraphModule &mod, boost::string_view name, const nlohmann::json &input, GraphStruct **toFill=nullptr)
Load a GraphStruct from json.
Forward declares all the chigraph data types.
Result jsonToGraphModule(Context &createInside, const nlohmann::json &input, const boost::filesystem::path &fullName, GraphModule **toFill=nullptr)
Load a GraphModule from json.
Result jsonToGraphFunction(GraphFunction &createInside, const nlohmann::json &input)
Load a GraphFunction–must already exist (use createGraphFunctionDeclarationFromJson) ...
The namespace where chigraph lives.
std::pair< std::string, std::string > parseObjectPair(const nlohmann::json &object)
Parse something that looks like: {"hello": "there"} into {"hello", "there"}.
Result createGraphFunctionDeclarationFromJson(GraphModule &createInside, const nlohmann::json &input, GraphFunction **toFill=nullptr)
Create a forward declaration of a function in a module with an empty graph.