this will become a proper specialization of `nlohmann::basic_json` soon. specialing basic_json will let us get rid of our `adl_serializer` hacks, and it'll open the door to better enum serializing behavior without also forcing all those who use lix as a library to set certain defines (which may not even be possible depending on how those users use json already). Change-Id: I5228d2b9df581a189552c993363207cfbd20f445
30 lines
608 B
C++
30 lines
608 B
C++
#pragma once
|
|
///@file
|
|
|
|
#include "lix/libutil/deprecated-features.hh"
|
|
#include "lix/libutil/json-utils.hh"
|
|
|
|
namespace nix {
|
|
|
|
/**
|
|
* Compute the documentation of all deprecated features.
|
|
*
|
|
* See `doc/manual` for how this information is used.
|
|
*/
|
|
JSON documentDeprecatedFeatures();
|
|
|
|
/**
|
|
* Semi-magic conversion to and from json.
|
|
* See the nlohmann/json readme for more details.
|
|
*/
|
|
void to_json(JSON &, const DeprecatedFeature &);
|
|
void from_json(const JSON &, DeprecatedFeature &);
|
|
|
|
/**
|
|
* It is always rendered as a string
|
|
*/
|
|
template<>
|
|
struct json_avoids_null<DeprecatedFeature> : std::true_type {};
|
|
|
|
};
|