lokinet/llarp/rpc/json_conversions.cpp
dr7ana 46ad8d4058 Clang format include sorting + CMake
- includes are now sorted in consistent, logical order; first step in an attempt to fix the tomfoolery (no relation to Tom) brought in by include-what-you-use
- shuffled around some cmake linking to simplify dependency graph
- superfluous files removed
2023-10-24 12:11:51 -07:00

20 lines
300 B
C++

#include "json_conversions.hpp"
#include <nlohmann/json.hpp>
namespace llarp
{
void
to_json(nlohmann::json& j, const IPRange& ipr)
{
j = ipr.ToString();
}
void
from_json(const nlohmann::json& j, IPRange& ipr)
{
ipr = IPRange{j.get<std::string>()};
}
} // namespace llarp