From 1d055261b4144dbf86b2658437015b15d4dd9bff Mon Sep 17 00:00:00 2001 From: Richard Date: Sun, 4 Sep 2022 00:32:56 +0100 Subject: initial --- include/jsoncons_ext/jsonschema/schema_version.hpp | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 include/jsoncons_ext/jsonschema/schema_version.hpp (limited to 'include/jsoncons_ext/jsonschema/schema_version.hpp') 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 + +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 -- cgit v1.2.3