aboutsummaryrefslogtreecommitdiff
path: root/include/jsoncons_ext/jsonschema/schema_version.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/jsoncons_ext/jsonschema/schema_version.hpp')
-rw-r--r--include/jsoncons_ext/jsonschema/schema_version.hpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/include/jsoncons_ext/jsonschema/schema_version.hpp b/include/jsoncons_ext/jsonschema/schema_version.hpp
new file mode 100644
index 0000000..b804712
--- /dev/null
+++ b/include/jsoncons_ext/jsonschema/schema_version.hpp
@@ -0,0 +1,35 @@
+// Copyright 2021 Daniel Parker
+// Distributed under the Boost license, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See https://github.com/danielaparker/jsoncons for latest version
+
+#ifndef JSONCONS_JSONSCHEMA_SCHEMA_VERSION_HPP
+#define JSONCONS_JSONSCHEMA_SCHEMA_VERSION_HPP
+
+#include <jsoncons/json.hpp>
+
+namespace jsoncons {
+namespace jsonschema {
+
+ class schema_version
+ {
+ public:
+ static bool contains(const string_view& url)
+ {
+ if (url.find("json-schema.org/draft-07/schema#") != string_view::npos)
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ };
+
+
+} // namespace jsonschema
+} // namespace jsoncons
+
+#endif // JSONCONS_JSONSCHEMA_JSONSCHEMA_VERSION_HPP