7#ifndef DUNEDAQ_CMDLIB_CMD_NLJS_HPP
8#define DUNEDAQ_CMDLIB_CMD_NLJS_HPP
14#include <nlohmann/json.hpp>
18 using data_t = nlohmann::json;
27 j.at(
"id").get_to(obj.id);
28 obj.data = j.at(
"data");
32 j[
"success"] = obj.success;
33 j[
"result"] = obj.result;
34 j[
"appname"] = obj.appname;
39 if (j.contains(
"success"))
40 j.at(
"success").get_to(obj.success);
41 if (j.contains(
"result"))
42 j.at(
"result").get_to(obj.result);
43 if (j.contains(
"appname"))
44 j.at(
"appname").get_to(obj.appname);
45 obj.data = j.at(
"data");
void to_json(data_t &j, const Command &obj)
void from_json(const data_t &j, Command &obj)