Skip to content

Latest commit

 

History

History
48 lines (34 loc) · 1.27 KB

make_schema.md

File metadata and controls

48 lines (34 loc) · 1.27 KB

jsoncons::jsonschema::make_schema: deprecated (since 0.174.0)

#include <jsoncons_ext/jsonschema/jsonschema.hpp>

template <class Json>
std::shared_ptr<json_schema<Json>> make_schema(const Json& schema);  (1)

template <class Json>
std::shared_ptr<json_schema<Json>> make_schema(const Json& schema,
    const std::string& retrieval_uri);                               (2) (since 0.173.0)

template <class Json,class URIResolver>
std::shared_ptr<json_schema<Json>> make_schema(const Json& schema,
    const std::string& retrieval_uri, const URIResolver& resolver);  (3) (since 0.173.0)

template <class Json,class URIResolver>
std::shared_ptr<json_schema<Json>> make_schema(const Json& schema, 
    const URIResolver& resolver);                                    (4)

Returns a shared_ptr to a json_schema<Json>.

Parameters

schema JSON Schema
resolver A function object with the signature of resolver being equivalent to
    Json fun(const jsoncons::uri& uri)   
    

Return value

Returns a shared_ptr to a json_schema<Json>.

Exceptions

(1)-(2) Throws a schema_error if JSON Schema compilation fails.