Loading...
Searching...
No Matches
ParametersJSON.h
Go to the documentation of this file.
1/*
2** This file is part of eOn.
3**
4** SPDX-License-Identifier: BSD-3-Clause
5**
6** Copyright (c) 2010--present, eOn Development Team
7** All rights reserved.
8**
9** Repo:
10** https://github.com/TheochemUI/eOn
11*/
12#pragma once
13
14#include <nlohmann/json.hpp>
15#include <string>
16
17namespace eonc {
18
19class Parameters;
20
21namespace config {
22
24nlohmann::json to_json(const Parameters &params);
25
27void from_json(const nlohmann::json &j, Parameters &params);
28
30int load_json(const std::string &json_str, Parameters &params);
31
32} // namespace config
33} // namespace eonc
void from_json(const json &j, Parameters &p)
Deserialize JSON into Parameters, then resolve computed fields.
json to_json(const Parameters &p)
Serialize all Parameters to JSON.
int load_json(const std::string &json_str, Parameters &params)
Load Parameters from a JSON string. Returns 0 on success.
RAII resource manager for the ARTn C library with global synchronization.