The built-time schema compiler of JSON BinPack. More...
Functions | |
SOURCEMETA_JSONBINPACK_COMPILER_EXPORT auto | sourcemeta::jsonbinpack::compile (sourcemeta::jsontoolkit::JSON &schema, const sourcemeta::jsontoolkit::SchemaWalker &walker, const sourcemeta::jsontoolkit::SchemaResolver &resolver, const std::optional< std::string > &default_dialect=std::nullopt) -> void |
SOURCEMETA_JSONBINPACK_COMPILER_EXPORT auto | sourcemeta::jsonbinpack::canonicalize (sourcemeta::jsontoolkit::JSON &schema, const sourcemeta::jsontoolkit::SchemaWalker &walker, const sourcemeta::jsontoolkit::SchemaResolver &resolver, const std::optional< std::string > &default_dialect=std::nullopt) -> void |
The built-time schema compiler of JSON BinPack.
This functionality is included as follows:
SOURCEMETA_JSONBINPACK_COMPILER_EXPORT auto sourcemeta::jsonbinpack::canonicalize | ( | sourcemeta::jsontoolkit::JSON & | schema, |
const sourcemeta::jsontoolkit::SchemaWalker & | walker, | ||
const sourcemeta::jsontoolkit::SchemaResolver & | resolver, | ||
const std::optional< std::string > & | default_dialect = std::nullopt |
||
) | -> void |
Transform a JSON Schema into its canonical form to prepare it for compilation. Keep in mind this function mutates the input schema. Also, the compile
function already performs canonicalization. This function is exposed mainly for debugging and testing purposes. For example:
SOURCEMETA_JSONBINPACK_COMPILER_EXPORT auto sourcemeta::jsonbinpack::compile | ( | sourcemeta::jsontoolkit::JSON & | schema, |
const sourcemeta::jsontoolkit::SchemaWalker & | walker, | ||
const sourcemeta::jsontoolkit::SchemaResolver & | resolver, | ||
const std::optional< std::string > & | default_dialect = std::nullopt |
||
) | -> void |
Compile a JSON Schema into an encoding schema. Keep in mind this function mutates the input schema. For example: