blob: 1bdb1c31339ca2ce9d15670515336444f52d56bf [file] [log] [blame]
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <memory>
#include <lib/fxl/strings/string_view.h>
#include <rapidjson/document.h>
#include <rapidjson/schema.h>
namespace json_schema {
// Build a SchemaDocument from a json encoded string.
std::unique_ptr<rapidjson::SchemaDocument> InitSchema(fxl::StringView json);
// Validate that the given json value match the given schema.
bool ValidateSchema(const rapidjson::Value& value,
const rapidjson::SchemaDocument& schema);
}; // namespace json_schema