mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-17 15:25:35 +00:00
19 lines
299 B
C++
19 lines
299 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
|