mirror of https://github.com/oxen-io/lokinet
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
299 B
C++
19 lines
299 B
C++
2 years ago
|
#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
|