NeoGraph 0.16.0
A C++20 Graph Agent Engine Library — LangGraph for C++
Loading...
Searching...
No Matches
json_schema.h
Go to the documentation of this file.
1
15#pragma once
16
17#include <neograph/api.h>
18#include <neograph/json.h>
19
20#include <string>
21
22namespace neograph::mcp {
23
26NEOGRAPH_API void validate_json_schema(const json& schema,
27 const std::string& path = "$schema");
28
31NEOGRAPH_API void validate_json_value(const json& value, const json& schema,
32 const std::string& subject = "JSON value",
33 const std::string& path = "$");
34
35} // namespace neograph::mcp
NEOGRAPH_API export/import macro for shared-library builds.
Thin C++ RAII wrapper around yyjson with nlohmann-compatible API.
NEOGRAPH_API void validate_json_schema(const json &schema, const std::string &path="$schema")
Check that schema is a JSON Schema 2020-12 document this validator supports; throw std::invalid_argum...
NEOGRAPH_API void validate_json_value(const json &value, const json &schema, const std::string &subject="JSON value", const std::string &path="$")
Validate value against schema (checked as above first).