compatibility: now it works with 3.x-release of nlohmann::json
The name conflict of json_pointer was fixed by renaming the one from here to local_json_pointer. Ugly, but better fixes take time.
This commit is contained in:
parent
378105024e
commit
dda72a0023
@ -61,14 +61,14 @@ namespace nlohmann
|
||||
// ~ and % - codec
|
||||
// needs testing and clarification regarding the '#' at the beginning
|
||||
|
||||
class json_pointer
|
||||
class local_json_pointer
|
||||
{
|
||||
std::string str_;
|
||||
|
||||
void from_string(const std::string &r);
|
||||
|
||||
public:
|
||||
json_pointer(const std::string &s = "")
|
||||
local_json_pointer(const std::string &s = "")
|
||||
{
|
||||
from_string(s);
|
||||
}
|
||||
@ -100,7 +100,7 @@ class JSON_SCHEMA_VALIDATOR_API json_uri
|
||||
std::string proto_;
|
||||
std::string hostname_;
|
||||
std::string path_;
|
||||
json_pointer pointer_;
|
||||
local_json_pointer pointer_;
|
||||
|
||||
protected:
|
||||
// decodes a JSON uri and replaces all or part of the currently stored values
|
||||
@ -120,7 +120,7 @@ public:
|
||||
const std::string protocol() const { return proto_; }
|
||||
const std::string hostname() const { return hostname_; }
|
||||
const std::string path() const { return path_; }
|
||||
const json_pointer pointer() const { return pointer_; }
|
||||
const local_json_pointer pointer() const { return pointer_; }
|
||||
|
||||
const std::string url() const;
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
namespace nlohmann
|
||||
{
|
||||
|
||||
void json_pointer::from_string(const std::string &r)
|
||||
void local_json_pointer::from_string(const std::string &r)
|
||||
{
|
||||
str_ = "#";
|
||||
|
||||
@ -89,7 +89,7 @@ void json_uri::from_string(const std::string &uri)
|
||||
else // otherwise it is a subfolder
|
||||
path_.append(path);
|
||||
|
||||
pointer_ = json_pointer("");
|
||||
pointer_ = local_json_pointer("");
|
||||
}
|
||||
|
||||
if (pointer.size() > 0)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user