1#ifndef FPMAS_BREAKPOINT_H
2#define FPMAS_BREAKPOINT_H
13#include "nlohmann/json.hpp"
15namespace fpmas {
namespace io {
39 void dump(std::ostream& stream,
const T&
object)
override {
41 nlohmann::json::json_serializer<T, void>::to_json(j,
object);
42 std::vector<uint8_t> data = nlohmann::json::to_msgpack(j);
66 void load(std::istream& stream, T&
object)
override {
67 std::vector<uint8_t> data;
69 for(
char i; stream.get(i);)
72 nlohmann::json j = nlohmann::json::from_msgpack(data);
73 nlohmann::json::json_serializer<T, void>::from_json(j,
object);
Definition: breakpoint.h:26
Definition: breakpoint.h:26
void dump(std::ostream &stream, const T &object) override
Definition: breakpoint.h:39
void load(std::istream &stream, T &object) override
Definition: breakpoint.h:66