|
|
@@ -3,14 +3,14 @@
|
|
|
#include <algorithm>
|
|
|
#include <cassert>
|
|
|
#include <iostream>
|
|
|
-#include <jvalidate/detail/expect.h>
|
|
|
-#include <jvalidate/detail/number.h>
|
|
|
#include <string>
|
|
|
#include <string_view>
|
|
|
#include <variant>
|
|
|
#include <vector>
|
|
|
|
|
|
#include <jvalidate/compat/compare.h>
|
|
|
+#include <jvalidate/detail/expect.h>
|
|
|
+#include <jvalidate/detail/number.h>
|
|
|
#include <jvalidate/forward.h>
|
|
|
|
|
|
namespace jvalidate::detail {
|
|
|
@@ -43,7 +43,7 @@ public:
|
|
|
* valid - and therefore that an invalidly formatter pointer string will
|
|
|
* point to somewhere non-existant (since it will be used in schema handling)
|
|
|
*/
|
|
|
- Pointer(std::string_view path, bool strict = false) {
|
|
|
+ Pointer(std::string_view path) {
|
|
|
if (path.empty()) {
|
|
|
return;
|
|
|
}
|
|
|
@@ -88,7 +88,6 @@ public:
|
|
|
|
|
|
// JSON-Pointers are required to start with a '/' although we only enforce
|
|
|
// that rule in Reference.
|
|
|
- EXPECT_M(not strict || path.starts_with('/'), "JSON Pointer must start with '/'");
|
|
|
path.remove_prefix(1);
|
|
|
// The rules of JSON-Pointer is that if a token were to contain a '/' as a
|
|
|
// strict character: then that character would be escaped, using the above
|