mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-11 00:36:20 +02:00
f4ab297b31
`///@file` makes them show up in the internal API dos. A tiny few were missing `#pragma once`.
15 lines
759 B
C++
15 lines
759 B
C++
#pragma once
|
|
///@file
|
|
|
|
#include "nlohmann/json_fwd.hpp"
|
|
|
|
// Following https://github.com/nlohmann/json#how-can-i-use-get-for-non-default-constructiblenon-copyable-types
|
|
#define JSON_IMPL(TYPE) \
|
|
namespace nlohmann { \
|
|
using namespace nix; \
|
|
template <> \
|
|
struct adl_serializer<TYPE> { \
|
|
static TYPE from_json(const json & json); \
|
|
static void to_json(json & json, TYPE t); \
|
|
}; \
|
|
}
|